Martin,
Jay, I don't want them to dock to top bottom and fill...
I want them to look like a vertical columns, I don't want them to look
like a horizontal boxes.
As I stated in my message if you want vertical columns (horizontal layout),
then dock on the left, right and change the Width.
If you want horizontal columns (vertical layout), then you need to dock on
the top & bottom and change the Height!
I have no idea why something so trivial is so ridiculously
complicated.
It is extremely trivial! I really don't see where it is complicated ;-)
The following is a form that has both vertical & horizontal Text boxes!
---x--- cut here ---x---
Option Strict On
Option Explicit On
Public Class TestForm
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.
InitializeComponent()
'Add any initialization after the InitializeComponent() 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.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'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 Panel1 As System.Windows.Forms.Panel
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Private WithEvents Panel2 As System.Windows.Forms.Panel
Private WithEvents TextBox4 As System.Windows.Forms.TextBox
Private WithEvents TextBox5 As System.Windows.Forms.TextBox
Private WithEvents TextBox6 As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.Panel1 = New System.Windows.Forms.Panel
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.Panel2 = New System.Windows.Forms.Panel
Me.TextBox4 = New System.Windows.Forms.TextBox
Me.TextBox5 = New System.Windows.Forms.TextBox
Me.TextBox6 = New System.Windows.Forms.TextBox
Me.Panel1.SuspendLayout()
Me.Panel2.SuspendLayout()
Me.SuspendLayout()
'
'Panel1
'
Me.Panel1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or
System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right),
System.Windows.Forms.AnchorStyles)
Me.Panel1.Controls.Add(Me.TextBox3)
Me.Panel1.Controls.Add(Me.TextBox2)
Me.Panel1.Controls.Add(Me.TextBox1)
Me.Panel1.Location = New System.Drawing.Point(8, 56)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(272, 192)
Me.Panel1.TabIndex = 0
'
'TextBox3
'
Me.TextBox3.Dock = System.Windows.Forms.DockStyle.Bottom
Me.TextBox3.Location = New System.Drawing.Point(0, 168)
Me.TextBox3.Multiline = True
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(272, 24)
Me.TextBox3.TabIndex = 2
Me.TextBox3.Text = "TextBox3"
'
'TextBox2
'
Me.TextBox2.Dock = System.Windows.Forms.DockStyle.Fill
Me.TextBox2.Location = New System.Drawing.Point(0, 24)
Me.TextBox2.Multiline = True
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(272, 168)
Me.TextBox2.TabIndex = 1
Me.TextBox2.Text = "TextBox2"
'
'TextBox1
'
Me.TextBox1.Dock = System.Windows.Forms.DockStyle.Top
Me.TextBox1.Location = New System.Drawing.Point(0, 0)
Me.TextBox1.Multiline = True
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(272, 24)
Me.TextBox1.TabIndex = 0
Me.TextBox1.Text = "TextBox1"
'
'Panel2
'
Me.Panel2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or
System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right),
System.Windows.Forms.AnchorStyles)
Me.Panel2.Controls.Add(Me.TextBox6)
Me.Panel2.Controls.Add(Me.TextBox5)
Me.Panel2.Controls.Add(Me.TextBox4)
Me.Panel2.Location = New System.Drawing.Point(8, 8)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(272, 32)
Me.Panel2.TabIndex = 1
'
'TextBox4
'
Me.TextBox4.Dock = System.Windows.Forms.DockStyle.Left
Me.TextBox4.Location = New System.Drawing.Point(0, 0)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(80, 22)
Me.TextBox4.TabIndex = 0
Me.TextBox4.Text = "TextBox4"
'
'TextBox5
'
Me.TextBox5.Dock = System.Windows.Forms.DockStyle.Fill
Me.TextBox5.Location = New System.Drawing.Point(80, 0)
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.Size = New System.Drawing.Size(192, 22)
Me.TextBox5.TabIndex = 1
Me.TextBox5.Text = "TextBox5"
'
'TextBox6
'
Me.TextBox6.Dock = System.Windows.Forms.DockStyle.Right
Me.TextBox6.Location = New System.Drawing.Point(172, 0)
Me.TextBox6.Name = "TextBox6"
Me.TextBox6.TabIndex = 2
Me.TextBox6.Text = "TextBox6"
'
'TestForm
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)
Me.ClientSize = New System.Drawing.Size(292, 260)
Me.Controls.Add(Me.Panel2)
Me.Controls.Add(Me.Panel1)
Me.Name = "TestForm"
Me.Text = "Test Form"
Me.Panel1.ResumeLayout(False)
Me.Panel2.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Panel1_Layout(ByVal sender As Object, ByVal e As
System.Windows.Forms.LayoutEventArgs) Handles Panel1.Layout
TextBox1.Height = Panel1.Height \ 3
TextBox3.Height = Panel1.Height \ 3
End Sub
Private Sub Panel2_Layout(ByVal sender As Object, ByVal e As
System.Windows.Forms.LayoutEventArgs) Handles Panel2.Layout
TextBox4.Width = Panel2.Width \ 3
TextBox6.Width = Panel2.Width \ 3
End Sub
End Class
---x--- cut here ---x---
Hope this helps
Jay
Martin Ho said:
Jay, I don't want them to dock to top bottom and fill...
I want them to look like a vertical columns, I don't want them to look
like a horizontal boxes.
Mike Bulava, could you please provide some little code on how to do
this?
I would really appreciate to see some example.
I have no idea why something so trivial is so ridiculously
complicated.
This should be easy to setup, the same way as when you designing
tables in html or so... This is just damn hard
Martin
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---