Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Do This
Message
From
08/04/2009 01:05:35
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Miscellaneous
Thread ID:
01391895
Message ID:
01393780
Views:
61
Kevin,

I'm sorry, but I have not really used TabControls. I played with them a little bit, but it was quite awhile ago and not enough to be able to answer your question off the top of my head. I'd need to play with it a bit first before I could answer, and I don't know when I might be able to get to that. Sorry! =0(

~~Bonnie



>Bonnie,
>
>First, I have decided to add a TabControl on the right side of the splitter. And, I have followed your advice and decided that if whatever panel I'm going to show on the right needs a Top & Bottom, I'll put a horizontal spliiter on the Panel in design time.
>
>But I'm still a but confused on a part of this. An example will illustrate my question -
>
>In VS when you double click a control, a new tab is opened with the code for the event for that control, or if the tab is open, it is selected. What object controls adding/activating tabs? Whatever this class is, it has to be aware of the form and the tabcontrol on it. Some class somewhere has to add a page to the tabcontrol, then add the panel to the page. It seems to me that this class has to be "global" in nature so that it can be called from anywhere.
>
>Assume that I have an OpenPanel method on the form. It takes an enum for the type of panel and a PK of the data item to display. Since it's on the form, any object on the form could call it. But what about calling it from outside the form? What if some other process wanted to open a panel? What is the reference to the form?
>
>Signed, Thoroughly Confused In CA
>
>
>
>
>
>>In our WinForm apps we have similar functionality. The Form uses Panels (you mentioned "Panes", so I'm wondering if you're using WPF? That's the only control I see called a Pane.) Anyway, we basically have two Panels, one on the left side, populated with SideBar Items (we use DevExpress for this) and a central Panel for "hosting" a UserControl When an Item is clicked in the left Panel, we instantiate, by Reflection, the appropriate UserControl based on what the user click. The existing UserControl that was in the Panel is removed and the newly instantiated UserControl is put in the Panel. It can load it's own data.
>>
>>You've further complicated it by adding a lower Panel, but it almost seems to me that the lower Panel should actually be part of the UserControl that's being loaded in the main Panel, and it would do a similar thing that the left SideBar does (instantiate a UserControl by reflection and put it into the lower Panel).
>>
>>In summary, what I'm thinking, is that you have three controls, a Form with a two Panels, a UserControl with two Panels, and a UserControl with no Panels. A click on something in the left-side Panel of the Form instantiates the proper UserControl with two Panels (and it's placed in the Form's right-side Panel). Since this new UserControl has an upper and lower Panel, when the user chooses something from the upper Panel, it instantiates the proper UserControl and places it in the lower Panel.
>>
>>~~Bonnie
>>
>>
>>
>>>I am designing an app that looks something like this: http://www.componentfactory.com/windows-forms-tabcontrol.php
>>>
>>>The area under "Family" will contain various types of lists of data, and possibly other controls. To facilitate this I am creating Panes with the grids or controls on them that I want to display, which is determined by what the user clicks on the left side. When the user clicks an item in the left side area, I will remove the current pane and add the selected pane, then load it with any data required.
>>>
>>>When the user takes action in the top pane, I want to load the lower pane, so again, remove the lower pane, add the selected pane.
>>>
>>>The question is this... How do I manage all of this, meaning, the panes have to be able to commicate with the form, which I could do via an event, but how do I code this if the controls are being added/removed at runtime?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform