I’m trying to display a large list of data with a panel with dynamic textboxes but there is no scrollbar appearing on the panel. The autoscroll property of the panel is set to True in the designer. The initial size of the panel is 960, 620 and the size of the form is 1000, 800.calculates as 65,535. Can someone tell how to get the scrollbar to appear? Or is a panel the wrong way to go? I do not want a datagridview or listview.Code:100 + (NumRows * iRowHeight)
Code:iRowHeight = 36 NumRows = dt.Rows.Count ReportPanel.Height = 100 + (NumRows * iRowHeight) Dim txtbx() As TextBox txtbx = Nothing ReDim txtbx(NumRows) index1 = 1 For Each row As DataRow In dt.Rows txtbx(index1) = New TextBox txtbx(index1).Visible = True txtbx(index1).Top = 5 + (iRowHeight * index1) txtbx(index1).Width = 225 txtbx(index1).Height = 20 txtbx(index1).Left = 140 txtbx(index1).Text = IIf(IsDBNull(row.Item("warehouse")), String.Empty, row.Item("warehouse")) AddHandler txtbx(index1).Click, AddressOf MyMessage Me.ReportPanel.Controls.Add(txtbx(index1)) index1 = index1 + 1 Next




Reply With Quote