Q: Newbe quiz. MDI Forms...

  • Thread starter Martin Arvidsson, Visual Systems AB
  • Start date
M

Martin Arvidsson, Visual Systems AB

Hi!

Before i am going to write my app, i need to ask two questions.

1. Is the MDI about to dissapear? What style of programing should you apply?

2. Did a little experiment with MDI forms. Created a MDI parent with menus
and all (from the template) Created a child. How can i from the child set
text in the statusPanel at the bottom of the MDI parent from the child?

Regards
Martin
 
N

Nicholas Paldino [.NET/C# MVP]

Martin,

MDI forms are not going anywhere.

As for updating the status on the MDI parent, you should pass to the
constructor (or pass through some method or property) a class which allows
you to set the text. So, in this case, when creating the children, you
would pass a reference to the status bar (or a class that has a method that
will change the statusbar text for you) to your child class. Your child
class would then store that reference and make a call when it wanted to
update the statusbar.

You could also expose an event on your child class which the parent
would hook up to and then update the status bar on its own when the event is
fired.

Hope this helps.
 
M

Martin Arvidsson, Visual Systems AB

Thanx Nicholas!

/Martin

Nicholas Paldino said:
Martin,

MDI forms are not going anywhere.

As for updating the status on the MDI parent, you should pass to the
constructor (or pass through some method or property) a class which allows
you to set the text. So, in this case, when creating the children, you
would pass a reference to the status bar (or a class that has a method
that will change the statusbar text for you) to your child class. Your
child class would then store that reference and make a call when it wanted
to update the statusbar.

You could also expose an event on your child class which the parent
would hook up to and then update the status bar on its own when the event
is fired.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Martin Arvidsson said:
Hi!

Before i am going to write my app, i need to ask two questions.

1. Is the MDI about to dissapear? What style of programing should you
apply?

2. Did a little experiment with MDI forms. Created a MDI parent with
menus
and all (from the template) Created a child. How can i from the child set
text in the statusPanel at the bottom of the MDI parent from the child?

Regards
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top