|
-
Sep 22nd, 2003, 05:00 AM
#1
Thread Starter
Member
tab system
i am making a very small program, about 30 kb or so, and size is very important...
i will be using a tab control with around 10 tabs, however, i want to use the tab interface merely for appearance, there will be no seperate tab pages since all pages will contain the same controls, but with certain properties of the controls changed when selectedindex of tabcontrol changes.
i was unable to put objects over the tab object so that they appear as seperate rather than tab-paged objects.
can anyone help?
thanks
-
Sep 22nd, 2003, 05:34 AM
#2
Can you create a single UserControl and use an instance of it on each of your tab pages? I would think that this will save on memory (although I'm not sure so I'd recommend doing a prototype first).
This world is not my home. I'm just passing through.
-
Sep 22nd, 2003, 10:18 AM
#3
Just set everything you want on the tabpages in a panel then add the panel to a tabpage, set its docking to fill and add this code:
VB Code:
Private Sub TabControl1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.SelectedIndexChanged
'at form start up the panel parent may not be set yet
If Not Panel1.Parent Is Nothing Then
'moves panel to the activate tab page
Panel1.Parent.Controls.Remove(Panel1)
TabControl1.SelectedTab.Controls.Add(Panel1)
End If
End Sub
This just keeps moving the panel to the activate tabpage.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|