I am going to use a bunch of panels to display and maintain data on a form. Based on what toolstripbutton the user clicks a panel will be made visible or not so they can work that data.
Each panel on top of each other basically...
How do you work with this in the IDE? Just BRING TO FRONT and SEND TO BACK? Or will that mess up something else at runtime?
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
In my opinion the best way to work in this kind of situation is to use a Wizard Control. I know .NET doesn't comes with such a control but you can download one from here or here. In this control basically a single page in shown at a time. The core benefit of using this is, you don't have do the all the Bring to Front and Send to Back work. It's all handled by the Wizard control itself. In one of my project I also needed such functionality, so I used Wizard Framework Control provided by DivElements. I was very comfortable with it.
I just want to manage this in the IDE. The app itself is handling the VISIBLE properties nicely - hiding the panels and showing the one panel that needs to be worked by the user...
It just seems a pain in the IDE to work with the panels at design time.
Do I really have to download something to handle that?
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Well... the way I told you was a better approach but you can't do much work after the building is built. If you want to work with a specific panel out of several panels in design mode then you need to select that panel's name from the Properties window. Once you select the panel name in Properties window, resizing rectangles will appears around the panel. Right click the resizing rectangles and Select Bring to Front. Now you can work with this panel. May be you know this but this is what I can think of then.
Yes - I just stumbled upon that trick - selecting the panel name in the property dropdown and then right-click the re-size rectangle. I thought there might be some keyboard trick or shortcut for this...
Was the wizard-download you suggested for making this easier at design time or is that download a control for use at runtime??
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
You can work with that Wizard Control at design time. That's why I suggested it to you. In any wizard control, you just need to select the page number to work with, the wizard control brings that page in front of you. It's just like a TabControl but displays a single page at a time. It seems like that DivElements is now charging for the control. When I used it, it was free. But this is not an issue. There are lots of free Wizard control available. You may find one at windowsclient website (first link in my first post).
Open the Document Outline window to see the z-order and parent/child relationships of controls. Ctrl+Alt+T or View -> Other Windows -> Document Outline. The z-order of the controls runs from the top to the bottom of the Document Outline. To bring a control to the front you select it and move it up with the Move Up button at the top. You can also move controls into and out of containers using the Move In and Move Out buttons. This is good if you accidentally drag one of your Panels into another.
Note that you can also drag and drop in the Document Outline tree.
Last edited by jmcilhinney; Oct 6th, 2008 at 11:45 PM.
In this type of scenario I usually create UserControls for each Page (Panel) which makes the job easier on Design Time. TabControl is also a good choice but we can't hide its tab buttons (easily). There is a control on codeproject
@jmc - that's exactly what I was looking for - very nice display of the controls and easy to move up and down...
But now that I see all my controls...
Should I be making more use of user-controls as sallushan suggests? Seems it might be a better way to organize things...
For instance I've got this tab-control and each tab has this language selection up top (see image below). Would it be better to create that little "label-combo-box-label-combo-box" as a user control and drop it onto each tab? Seems it would be a lot easier to keep them in a consistent place on the tabs by doing this.
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".
Do you need a different instance for each tab or just one for the whole form? If the former then yes, a UserControl is the way to go. If the latter then add one instance of those controls to the form, not each tab, but just set their Location so they appear on top of the TabControl.
Yes - we need a different instance on each tab. Actually the little combo-control is about to get more complex. Not only is there a different language pair possible for each tab there is also a possibility of several language pairs on a tab - so we need a way to "step" through the pairs on the tab itself. On the tab below that pair is rates that the person charges for that activity in that language pair. I'm going to go the path of the user-control...
I'm going to mark this thread resolved - I definately can work the panel z-order in several ways now in the IDE.
Thanks!
*** Read the sticky in the DB forum about how to get your question answered quickly!! ***
Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".