473,654 Members | 3,062 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tab Controls..

VJ
I am looking to have 2 Tab Controls on a Windows Forms.. One with Tabs on
Top and another with Tabs on the side... I want them both to occupy the
entire area of the form, but I need the Tab Headers to be visible for both
of them .. at all times... How do I accomplish this?

Also can One Tab control have Tab Headers on Top and Side.. at the same
time?..That might solve this problem easily :-)

Thanks
Vijay
Nov 20 '05 #1
11 2129
* "VJ" <vi********@yah oo.com> scripsit:
I am looking to have 2 Tab Controls on a Windows Forms.. One with Tabs on
Top and another with Tabs on the side... I want them both to occupy the
entire area of the form, but I need the Tab Headers to be visible for both
of them .. at all times... How do I accomplish this?

Also can One Tab control have Tab Headers on Top and Side.. at the same
time?..That might solve this problem easily :-)


Set the tabcontrol's 'Alignment' property to a value <> 'Top' and then
reset it to 'Top'. This will show the tabs in multiple rows if required.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
VJ
Yea that part I get it.. But I won't have the Top and Side tabs visible at
the same time?.. Or did I miss something?

Vijay

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:2k******** ****@uni-berlin.de...
* "VJ" <vi********@yah oo.com> scripsit:
I am looking to have 2 Tab Controls on a Windows Forms.. One with Tabs on Top and another with Tabs on the side... I want them both to occupy the
entire area of the form, but I need the Tab Headers to be visible for both of them .. at all times... How do I accomplish this?

Also can One Tab control have Tab Headers on Top and Side.. at the same
time?..That might solve this problem easily :-)


Set the tabcontrol's 'Alignment' property to a value <> 'Top' and then
reset it to 'Top'. This will show the tabs in multiple rows if required.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3
* "VJ" <vi********@yah oo.com> scripsit:
Yea that part I get it.. But I won't have the Top and Side tabs visible at
the same time?.. Or did I miss something?


AFAIK, that's not supported.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4
VJ,
I would add two tab controls to the form, one with alignment Top & one with
alignment Left (or Right). I would either size both controls so only the
tabs were visible, or attempt to overlay & offset one control on top of the
other. Depending on what is being displayed in the center (what "Tab pages"
were being displayed.

If I went with overlaying & offset controls, I would handle the
Tabcontrol.Clic ked event to bring that control to the front.

Something like:

Public Class TabbedForm
Inherits System.Windows. Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeCompo nent()

'Add any initialization after the InitializeCompo nent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Disp ose()
End If
End If
MyBase.Dispose( disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.Componen tModel.IContain er

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Private WithEvents TabControl1 As System.Windows. Forms.TabContro l
Private WithEvents TabPage1 As System.Windows. Forms.TabPage
Private WithEvents TabPage2 As System.Windows. Forms.TabPage
Private WithEvents TabControl2 As System.Windows. Forms.TabContro l
Private WithEvents TabPage3 As System.Windows. Forms.TabPage
Private WithEvents TabPage4 As System.Windows. Forms.TabPage
Private WithEvents Label1 As System.Windows. Forms.Label
Private WithEvents Label2 As System.Windows. Forms.Label
Private WithEvents Label3 As System.Windows. Forms.Label
Private WithEvents Label4 As System.Windows. Forms.Label
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
Me.TabControl1 = New System.Windows. Forms.TabContro l
Me.TabPage1 = New System.Windows. Forms.TabPage
Me.Label1 = New System.Windows. Forms.Label
Me.TabPage2 = New System.Windows. Forms.TabPage
Me.Label2 = New System.Windows. Forms.Label
Me.TabControl2 = New System.Windows. Forms.TabContro l
Me.TabPage3 = New System.Windows. Forms.TabPage
Me.Label3 = New System.Windows. Forms.Label
Me.TabPage4 = New System.Windows. Forms.TabPage
Me.Label4 = New System.Windows. Forms.Label
Me.TabControl1. SuspendLayout()
Me.TabPage1.Sus pendLayout()
Me.TabPage2.Sus pendLayout()
Me.TabControl2. SuspendLayout()
Me.TabPage3.Sus pendLayout()
Me.TabPage4.Sus pendLayout()
Me.SuspendLayou t()
'
'TabControl1
'
Me.TabControl1. Controls.Add(Me .TabPage1)
Me.TabControl1. Controls.Add(Me .TabPage2)
Me.TabControl1. Location = New System.Drawing. Point(32, 8)
Me.TabControl1. Name = "TabControl 1"
Me.TabControl1. SelectedIndex = 0
Me.TabControl1. Size = New System.Drawing. Size(256, 248)
Me.TabControl1. TabIndex = 0
'
'TabPage1
'
Me.TabPage1.Con trols.Add(Me.La bel1)
Me.TabPage1.Loc ation = New System.Drawing. Point(4, 25)
Me.TabPage1.Nam e = "TabPage1"
Me.TabPage1.Siz e = New System.Drawing. Size(248, 219)
Me.TabPage1.Tab Index = 0
Me.TabPage1.Tex t = "TabPage1"
'
'Label1
'
Me.Label1.Locat ion = New System.Drawing. Point(72, 80)
Me.Label1.Name = "Label1"
Me.Label1.TabIn dex = 0
Me.Label1.Text = "Label1"
'
'TabPage2
'
Me.TabPage2.Con trols.Add(Me.La bel2)
Me.TabPage2.Loc ation = New System.Drawing. Point(4, 25)
Me.TabPage2.Nam e = "TabPage2"
Me.TabPage2.Siz e = New System.Drawing. Size(248, 219)
Me.TabPage2.Tab Index = 1
Me.TabPage2.Tex t = "TabPage2"
'
'Label2
'
Me.Label2.Locat ion = New System.Drawing. Point(72, 80)
Me.Label2.Name = "Label2"
Me.Label2.TabIn dex = 0
Me.Label2.Text = "Label2"
'
'TabControl2
'
Me.TabControl2. Alignment = System.Windows. Forms.TabAlignm ent.Left
Me.TabControl2. Controls.Add(Me .TabPage3)
Me.TabControl2. Controls.Add(Me .TabPage4)
Me.TabControl2. Location = New System.Drawing. Point(8, 32)
Me.TabControl2. Multiline = True
Me.TabControl2. Name = "TabControl 2"
Me.TabControl2. SelectedIndex = 0
Me.TabControl2. Size = New System.Drawing. Size(280, 224)
Me.TabControl2. TabIndex = 1
'
'TabPage3
'
Me.TabPage3.Con trols.Add(Me.La bel3)
Me.TabPage3.Loc ation = New System.Drawing. Point(25, 4)
Me.TabPage3.Nam e = "TabPage3"
Me.TabPage3.Siz e = New System.Drawing. Size(251, 216)
Me.TabPage3.Tab Index = 0
Me.TabPage3.Tex t = "TabPage3"
'
'Label3
'
Me.Label3.Locat ion = New System.Drawing. Point(72, 80)
Me.Label3.Name = "Label3"
Me.Label3.TabIn dex = 0
Me.Label3.Text = "Label3"
'
'TabPage4
'
Me.TabPage4.Con trols.Add(Me.La bel4)
Me.TabPage4.Loc ation = New System.Drawing. Point(25, 4)
Me.TabPage4.Nam e = "TabPage4"
Me.TabPage4.Siz e = New System.Drawing. Size(251, 216)
Me.TabPage4.Tab Index = 1
Me.TabPage4.Tex t = "TabPage4"
'
'Label4
'
Me.Label4.Locat ion = New System.Drawing. Point(72, 80)
Me.Label4.Name = "Label4"
Me.Label4.TabIn dex = 0
Me.Label4.Text = "Label4"
'
'TabbedForm
'
Me.AutoScaleBas eSize = New System.Drawing. Size(6, 15)
Me.ClientSize = New System.Drawing. Size(292, 260)
Me.Controls.Add (Me.TabControl2 )
Me.Controls.Add (Me.TabControl1 )
Me.Name = "TabbedForm "
Me.Text = "TabbedForm "
Me.TabControl1. ResumeLayout(Fa lse)
Me.TabPage1.Res umeLayout(False )
Me.TabPage2.Res umeLayout(False )
Me.TabControl2. ResumeLayout(Fa lse)
Me.TabPage3.Res umeLayout(False )
Me.TabPage4.Res umeLayout(False )
Me.ResumeLayout (False)

End Sub

#End Region

Private Sub TabControl1_Cli ck(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles TabControl1.Cli ck, TabControl2.Cli ck
Dim tc As TabControl = DirectCast(send er, TabControl)
tc.BringToFront ()
End Sub

End Class

Hope this helps
Jay

"VJ" <vi********@yah oo.com> wrote in message
news:u1******** ******@TK2MSFTN GP11.phx.gbl...
I am looking to have 2 Tab Controls on a Windows Forms.. One with Tabs on
Top and another with Tabs on the side... I want them both to occupy the
entire area of the form, but I need the Tab Headers to be visible for both
of them .. at all times... How do I accomplish this?

Also can One Tab control have Tab Headers on Top and Side.. at the same
time?..That might solve this problem easily :-)

Thanks
Vijay

Nov 20 '05 #5
VJ
Hi..

Thanks for the information. I have got a idea... Just still not sure how to
get the height of just the top tab area... I am able to do that in the
DrawItem event, and not outside of it.

Thanks
Vijay

"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:O9******** ******@TK2MSFTN GP09.phx.gbl...
VJ,
I would add two tab controls to the form, one with alignment Top & one with alignment Left (or Right). I would either size both controls so only the
tabs were visible, or attempt to overlay & offset one control on top of the other. Depending on what is being displayed in the center (what "Tab pages" were being displayed.

If I went with overlaying & offset controls, I would handle the
Tabcontrol.Clic ked event to bring that control to the front.

Something like:

Public Class TabbedForm
Inherits System.Windows. Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeCompo nent()

'Add any initialization after the InitializeCompo nent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Disp ose()
End If
End If
MyBase.Dispose( disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.Componen tModel.IContain er

'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Private WithEvents TabControl1 As System.Windows. Forms.TabContro l
Private WithEvents TabPage1 As System.Windows. Forms.TabPage
Private WithEvents TabPage2 As System.Windows. Forms.TabPage
Private WithEvents TabControl2 As System.Windows. Forms.TabContro l
Private WithEvents TabPage3 As System.Windows. Forms.TabPage
Private WithEvents TabPage4 As System.Windows. Forms.TabPage
Private WithEvents Label1 As System.Windows. Forms.Label
Private WithEvents Label2 As System.Windows. Forms.Label
Private WithEvents Label3 As System.Windows. Forms.Label
Private WithEvents Label4 As System.Windows. Forms.Label
<System.Diagnos tics.DebuggerSt epThrough()> Private Sub
InitializeCompo nent()
Me.TabControl1 = New System.Windows. Forms.TabContro l
Me.TabPage1 = New System.Windows. Forms.TabPage
Me.Label1 = New System.Windows. Forms.Label
Me.TabPage2 = New System.Windows. Forms.TabPage
Me.Label2 = New System.Windows. Forms.Label
Me.TabControl2 = New System.Windows. Forms.TabContro l
Me.TabPage3 = New System.Windows. Forms.TabPage
Me.Label3 = New System.Windows. Forms.Label
Me.TabPage4 = New System.Windows. Forms.TabPage
Me.Label4 = New System.Windows. Forms.Label
Me.TabControl1. SuspendLayout()
Me.TabPage1.Sus pendLayout()
Me.TabPage2.Sus pendLayout()
Me.TabControl2. SuspendLayout()
Me.TabPage3.Sus pendLayout()
Me.TabPage4.Sus pendLayout()
Me.SuspendLayou t()
'
'TabControl1
'
Me.TabControl1. Controls.Add(Me .TabPage1)
Me.TabControl1. Controls.Add(Me .TabPage2)
Me.TabControl1. Location = New System.Drawing. Point(32, 8)
Me.TabControl1. Name = "TabControl 1"
Me.TabControl1. SelectedIndex = 0
Me.TabControl1. Size = New System.Drawing. Size(256, 248)
Me.TabControl1. TabIndex = 0
'
'TabPage1
'
Me.TabPage1.Con trols.Add(Me.La bel1)
Me.TabPage1.Loc ation = New System.Drawing. Point(4, 25)
Me.TabPage1.Nam e = "TabPage1"
Me.TabPage1.Siz e = New System.Drawing. Size(248, 219)
Me.TabPage1.Tab Index = 0
Me.TabPage1.Tex t = "TabPage1"
'
'Label1
'
Me.Label1.Locat ion = New System.Drawing. Point(72, 80)
Me.Label1.Name = "Label1"
Me.Label1.TabIn dex = 0
Me.Label1.Text = "Label1"
'
'TabPage2
'
Me.TabPage2.Con trols.Add(Me.La bel2)
Me.TabPage2.Loc ation = New System.Drawing. Point(4, 25)
Me.TabPage2.Nam e = "TabPage2"
Me.TabPage2.Siz e = New System.Drawing. Size(248, 219)
Me.TabPage2.Tab Index = 1
Me.TabPage2.Tex t = "TabPage2"
'
'Label2
'
Me.Label2.Locat ion = New System.Drawing. Point(72, 80)
Me.Label2.Name = "Label2"
Me.Label2.TabIn dex = 0
Me.Label2.Text = "Label2"
'
'TabControl2
'
Me.TabControl2. Alignment = System.Windows. Forms.TabAlignm ent.Left
Me.TabControl2. Controls.Add(Me .TabPage3)
Me.TabControl2. Controls.Add(Me .TabPage4)
Me.TabControl2. Location = New System.Drawing. Point(8, 32)
Me.TabControl2. Multiline = True
Me.TabControl2. Name = "TabControl 2"
Me.TabControl2. SelectedIndex = 0
Me.TabControl2. Size = New System.Drawing. Size(280, 224)
Me.TabControl2. TabIndex = 1
'
'TabPage3
'
Me.TabPage3.Con trols.Add(Me.La bel3)
Me.TabPage3.Loc ation = New System.Drawing. Point(25, 4)
Me.TabPage3.Nam e = "TabPage3"
Me.TabPage3.Siz e = New System.Drawing. Size(251, 216)
Me.TabPage3.Tab Index = 0
Me.TabPage3.Tex t = "TabPage3"
'
'Label3
'
Me.Label3.Locat ion = New System.Drawing. Point(72, 80)
Me.Label3.Name = "Label3"
Me.Label3.TabIn dex = 0
Me.Label3.Text = "Label3"
'
'TabPage4
'
Me.TabPage4.Con trols.Add(Me.La bel4)
Me.TabPage4.Loc ation = New System.Drawing. Point(25, 4)
Me.TabPage4.Nam e = "TabPage4"
Me.TabPage4.Siz e = New System.Drawing. Size(251, 216)
Me.TabPage4.Tab Index = 1
Me.TabPage4.Tex t = "TabPage4"
'
'Label4
'
Me.Label4.Locat ion = New System.Drawing. Point(72, 80)
Me.Label4.Name = "Label4"
Me.Label4.TabIn dex = 0
Me.Label4.Text = "Label4"
'
'TabbedForm
'
Me.AutoScaleBas eSize = New System.Drawing. Size(6, 15)
Me.ClientSize = New System.Drawing. Size(292, 260)
Me.Controls.Add (Me.TabControl2 )
Me.Controls.Add (Me.TabControl1 )
Me.Name = "TabbedForm "
Me.Text = "TabbedForm "
Me.TabControl1. ResumeLayout(Fa lse)
Me.TabPage1.Res umeLayout(False )
Me.TabPage2.Res umeLayout(False )
Me.TabControl2. ResumeLayout(Fa lse)
Me.TabPage3.Res umeLayout(False )
Me.TabPage4.Res umeLayout(False )
Me.ResumeLayout (False)

End Sub

#End Region

Private Sub TabControl1_Cli ck(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles TabControl1.Cli ck, TabControl2.Cli ck
Dim tc As TabControl = DirectCast(send er, TabControl)
tc.BringToFront ()
End Sub

End Class

Hope this helps
Jay

"VJ" <vi********@yah oo.com> wrote in message
news:u1******** ******@TK2MSFTN GP11.phx.gbl...
I am looking to have 2 Tab Controls on a Windows Forms.. One with Tabs on Top and another with Tabs on the side... I want them both to occupy the
entire area of the form, but I need the Tab Headers to be visible for both of them .. at all times... How do I accomplish this?

Also can One Tab control have Tab Headers on Top and Side.. at the same
time?..That might solve this problem easily :-)

Thanks
Vijay


Nov 20 '05 #6
Nice Solution.
In addition set Tabcontrols Anchor to Left + Top + Right + Bottom

Then Add The Following:
\\\
Private Sub Form_Resize(ByV al sender As Object, ByVal e As EventArgs) _
Handles MyBase.Resize
TabControl1.Top = 0
TabControl1.Lef t = TabControl2.Sel ectedTab.Left - 2
TabControl1.Wid th = Me.ClientSize.W idth - TabControl1.Lef t
TabControl1.Hei ght = Me.ClientSize.H eight

TabControl1.Lef t = 0
TabControl2.Top = TabControl1.Sel ectedTab.Top - 2
TabControl2.Wid th = Me.ClientSize.W idth
TabControl2.Hei ght = Me.ClientSize.H eight - TabControl2.Top
End Sub
///

--
Mick Doherty
http://dotnetrix.co.uk
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 20 '05 #7
Mick,
I would either set the Anchor, or I would add your code to the Layout event.

I would not code both as you are "competing" with each other, The form will
resize the Tab Controls, then you resize the tab controls.

Hope this helps
Jay

"Mick Doherty"
<EX***********@ AND.REMOVE.SQUA REBRACKETS.[mdaudi100#ntlwo rld.com]> wrote in
message news:OE******** ******@TK2MSFTN GP10.phx.gbl...
Nice Solution.
In addition set Tabcontrols Anchor to Left + Top + Right + Bottom

Then Add The Following:
\\\
Private Sub Form_Resize(ByV al sender As Object, ByVal e As EventArgs) _
Handles MyBase.Resize TabControl1.Top = 0
TabControl1.Lef t = TabControl2.Sel ectedTab.Left - 2
TabControl1.Wid th = Me.ClientSize.W idth - TabControl1.Lef t
TabControl1.Hei ght = Me.ClientSize.H eight

TabControl1.Lef t = 0
TabControl2.Top = TabControl1.Sel ectedTab.Top - 2
TabControl2.Wid th = Me.ClientSize.W idth
TabControl2.Hei ght = Me.ClientSize.H eight - TabControl2.Top
End Sub
///

--
Mick Doherty
http://dotnetrix.co.uk
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004

Nov 20 '05 #8
You're right. You should set Anchor to None.
I originally put the code in the layout event but then discovered that the
location needed to change when an extra row was added (Tabcontrol2, being
side aligned, is multiline whether we like it or not).

In fact the solution does not work as expected since the rowcount also
changes on resize so as tabcontrol2 is resized the rowcount may change but
the location of TabControl1 has already been set and vice-versa. A better
solution is needed, but I'm off to bed. If nobody comes up with one I'll
look at it tomorrow.

--
Mick Doherty
http://dotnetrix.co.uk
"Jay B. Harlow [MVP - Outlook]" <Ja************ @msn.com> wrote in message
news:uO******** ******@TK2MSFTN GP11.phx.gbl...
Mick,
I would either set the Anchor, or I would add your code to the Layout event.
I would not code both as you are "competing" with each other, The form will resize the Tab Controls, then you resize the tab controls.

Hope this helps
Jay

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 20 '05 #9
a bit of a hack, but it's the best I could come up with:

\\\
'Tabcontrol does not have a selectedtab and controls has not set zOrder
until
'the form is visible. The resize event does fire before the form is visible
though.
'So this is to fix the null reference problems.
Private LayingOut As Boolean = True

Private Sub TabbedForm_Load (ByVal sender As Object, ByVal e As EventArgs) _
Handles MyBase.Load
LayingOut = False
'Now that the forms visible let's force a resize to align the tabcontrols
Me.Width += 1
Me.Width -= 1
End Sub

Protected Overrides Sub OnResize(ByVal e As System.EventArg s)
MyBase.OnResize (e)

If LayingOut Then Return

Dim TC1zOrder, TC2zOrder As Integer
TC1zOrder = Me.Controls.Get ChildIndex(TabC ontrol1)
TC1zOrder = Me.Controls.Get ChildIndex(TabC ontrol2)

If TC1zOrder > TC2zOrder Then
RePositionTabCo ntrol(TabContro l2)
RePositionTabCo ntrol(TabContro l1)
RePositionTabCo ntrol(TabContro l2)
Else
RePositionTabCo ntrol(TabContro l1)
RePositionTabCo ntrol(TabContro l2)
RePositionTabCo ntrol(TabContro l1)
End If

End Sub

Private Sub RePositionTabCo ntrol(ByVal tc As TabControl)

If tc Is TabControl1 Then
tc.Top = 0
tc.Left = TabControl2.Sel ectedTab.Left - 2
tc.Width = Me.ClientSize.W idth - tc.Left
tc.Height = Me.ClientSize.H eight
Else
tc.Left = 0
tc.Top = TabControl1.Sel ectedTab.Top - 2
tc.Width = Me.ClientSize.W idth
tc.Height = Me.ClientSize.H eight - tc.Top
End If

End Sub
///

--
Mick Doherty
http://dotnetrix.co.uk
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.701 / Virus Database: 458 - Release Date: 07/06/2004
Nov 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
7214
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
0
2298
by: Mark Johnson | last post by:
Sometimes Controls that have been added to a GroupBox do not show up. What I am doing : 1) I am not using the designer, but create all the Controls per hand: groupBoxProdukt_01 = new System.Windows.Forms.GroupBox(); etc. for all other Controls. After setting Font and Text values I then add them to the Panel: pnPanelControls.Controls.Add(groupBoxProdukt_01); pnPanelControls.Controls.Add(groupBoxProdukt_02);...
3
2639
by: Steve Drake | last post by:
All, I have a CONTROL that contains 1 control (Control ONE), the 1 control that it can contain 1 or 2 control (Control A and B). Control A, raises and event and Control ONE receives this event and this causes control B to be created, when this is done the VIEWSTATE is lost for CONTROL B. In the EVENT that causes CONTROL B to be created I have to set
1
2130
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new to programming, but I am new to ASP.NET and Web application design in general... loved the concept of user controls and dynamically adding them to a page. So what I wound up with was an application that dynamically loads two user controls directly...
10
5303
by: Sacha Korell | last post by:
I'm trying to load a drop-down list with all DropDownList control names from another page. How would I be able to find those DropDownList controls? The FindControl method will only find a certain control by id, but I want to find all controls of a certain type (DropDownList in this case). Is there an easier way than to get a control count of the page, loop through all controls on that page, examine their type and, if they're a...
6
2235
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the corrent number of controls. The problem is that they appear next to each other. I want to create the controls with some wording to the left of them (again, dynamically generated). Normally id use <table> with two colums, one for the
66
4110
by: Cor | last post by:
Hi, I start a new thread about a discussion from yesterday (or for some of us this morning). It was a not so nice discussion about dynamically removing controls from a panel or what ever. It started by an example from me, that was far from complete and with typing errors, but basically it had the meaning to show that removing controls reversible was the nicest method. This was a lets say conclusion (but what is that in a newsgroup) in a...
7
2467
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls each with a couple of controls in them I then rebuilt my project and my new panels and all controls they contained are gone... I've looked through the Auto generated code but don't see anything that looks wrong Any body have any idea why this...
15
2173
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) Dim dSet As DataSet Dim sqlConn As SqlConnection Dim sqlDapter As SqlDataAdapter sqlConn = New SqlConnection("Data Source=AD\SQLEXPRESS;Initial
8
3572
by: Ryan | last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip, data binding elements (dataset, binding source, table adapter), tab control with 7 tab pages, each page contains a picture box, lots of text boxes (for input).. you get the idea. All of a sudden everything on the form has disappeared, it looks like a blank, newly created form. I can still get to the properties of every item on the form using the drop-down box in...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8707
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8482
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8593
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7306
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2714
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.