Click here to Skip to main content
15,891,136 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: What is the difference between VB and VB.NET? Pin
Kevin Brydon28-May-08 22:44
Kevin Brydon28-May-08 22:44 
AnswerRe: What is the difference between VB and VB.NET? Pin
Guffa29-May-08 6:48
Guffa29-May-08 6:48 
QuestionCombobox with multiple selection Pin
camarate28-May-08 1:59
camarate28-May-08 1:59 
AnswerRe: Combobox with multiple selection Pin
Kevin Brydon28-May-08 2:35
Kevin Brydon28-May-08 2:35 
GeneralRe: Combobox with multiple selection Pin
camarate28-May-08 2:55
camarate28-May-08 2:55 
GeneralRe: Combobox with multiple selection Pin
Steven J Jowett28-May-08 5:59
Steven J Jowett28-May-08 5:59 
GeneralRe: Combobox with multiple selection Pin
camarate28-May-08 6:27
camarate28-May-08 6:27 
QuestionDynamically creating controls with TableLayoutPanel Contrrols Pin
pavya_Cool28-May-08 1:34
pavya_Cool28-May-08 1:34 
Hi to all,

I am trying to dynamically create label controls on TableLayoutPanel control, so that i have wrote following code. but at the debugging time it will genarate all the lables, but it doesnt show that panel as output. I checked its visible property its always false.... any body know why this happened?

Public Sub fillTablePanel(ByVal ds As DataSet, ByVal TableName As String)
FormContent.TablePanel.Parent = FormContent
FormContent.TablePanel.Visible = True

FormContent.TablePanel.BackColor = System.Drawing.SystemColors.ActiveCaptionText
FormContent.TablePanel.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.OutsetPartial
Dim tRows, tCols As Integer
FormContent.TablePanel.ColumnCount = ds.Tables(TableName).Columns.Count
For tCols = 0 To ds.Tables(TableName).Columns.Count - 1
FormContent.TablePanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100 / (ds.Tables(TableName).Columns.Count)))
Next
FormContent.TablePanel.RowCount = ds.Tables(TableName).Rows.Count
For tRows = 0 To ds.Tables(TableName).Rows.Count - 1
FormContent.TablePanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100 / (ds.Tables(TableName).Rows.Count)))
Next

ReDim FormContent.lblHeader(ds.Tables(TableName).Columns.Count)
For tCols = 0 To ds.Tables(TableName).Columns.Count - 1
FormContent.lblHeader(tCols) = New Label()
FormContent.TablePanel.Controls.Add(FormContent.lblHeader(tCols), tCols, 0)
FormContent.lblHeader(tCols).Text = Convert.ToString(ds.Tables(TableName).Columns.Item(tCols))
FormContent.lblHeader(tCols).Location = New Point(FormContent.TablePanel.Location.X, 10)
FormContent.lblHeader(tCols).Visible = True
FormContent.lblHeader(tCols).AutoSize = True
Next

FormContent.TablePanel.Location = New System.Drawing.Point(221, 46)
FormContent.TablePanel.Name = "TablePanel"
FormContent.TablePanel.RowCount = 2
Dim x As Integer = ds.Tables(TableName).Columns.Count
Dim y As Integer = ds.Tables(TableName).Rows.Count
ReDim FormContent.lblContent(x * y)
Dim ctr As Integer = 0
For tRows = 0 To ds.Tables(TableName).Rows.Count - 1
For tCols = 0 To ds.Tables(TableName).Columns.Count - 1
FormContent.lblContent(ctr) = New Label()
FormContent.TablePanel.Controls.Add(FormContent.lblContent(ctr), tCols, tRows)
FormContent.lblContent(ctr).Text = Convert.ToString(ds.Tables(TableName).Rows(tRows).Item(tCols))
FormContent.lblContent(ctr).Location = New Point(FormContent.TablePanel.Location.X, 100)
FormContent.lblContent(ctr).Visible = True
FormContent.lblContent(ctr).AutoSize = True
ctr += 1
Next
Next
FormContent.TablePanel.Size = New System.Drawing.Size(386, 93)
FormContent.TablePanel.TabIndex = 5
FormContent.TablePanel.Visible = True

End Sub

Pravin

AnswerRe: Dynamically creating controls with TableLayoutPanel Contrrols Pin
Mycroft Holmes28-May-08 15:55
professionalMycroft Holmes28-May-08 15:55 
QuestionVS 2005 references Pin
Mohammad Al Hoss28-May-08 0:38
Mohammad Al Hoss28-May-08 0:38 
AnswerRe: VS 2005 references Pin
Thomas Stockwell30-May-08 10:56
professionalThomas Stockwell30-May-08 10:56 
QuestionHow to get file size from website Pin
Kumaran21cen28-May-08 0:18
Kumaran21cen28-May-08 0:18 
AnswerRe: How to get file size from website Pin
dan!sh 28-May-08 0:54
professional dan!sh 28-May-08 0:54 
QuestionSetup Wizard Pin
cm pandian27-May-08 22:48
cm pandian27-May-08 22:48 
QuestionRead MySQL TinyText column from VB.NET [modified] Pin
drexler_kk27-May-08 20:15
drexler_kk27-May-08 20:15 
AnswerRe: Read MySQL TinyText column from VB.NET Pin
jzonthemtn28-May-08 2:00
jzonthemtn28-May-08 2:00 
GeneralRe: Read MySQL TinyText column from VB.NET Pin
drexler_kk28-May-08 13:02
drexler_kk28-May-08 13:02 
GeneralRe: Read MySQL TinyText column from VB.NET Pin
jzonthemtn29-May-08 2:36
jzonthemtn29-May-08 2:36 
QuestionHow to save outgoing mails in Outlook Express Sent Items Folder. Pin
SekharOne27-May-08 19:15
SekharOne27-May-08 19:15 
AnswerRe: How to save outgoing mails in Outlook Express Sent Items Folder. Pin
Sam Xavier28-May-08 23:34
Sam Xavier28-May-08 23:34 
QuestionKeep forms looking the same across different computers Pin
cstrader23227-May-08 9:36
cstrader23227-May-08 9:36 
AnswerRe: Keep forms looking the same across different computers Pin
Scott Dorman27-May-08 16:35
professionalScott Dorman27-May-08 16:35 
GeneralRe: Keep forms looking the same across different computers Pin
cstrader23227-May-08 17:03
cstrader23227-May-08 17:03 
GeneralRe: Keep forms looking the same across different computers Pin
Scott Dorman27-May-08 17:15
professionalScott Dorman27-May-08 17:15 
GeneralRe: Keep forms looking the same across different computers Pin
supercat927-May-08 18:18
supercat927-May-08 18:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.