I am creating an application using Windows Application Forms. I'm basically new to C# and Visual Studio(Been using it since yesterday). So far, I've succeeded in creating a simplistic form as shown in the screenshot.
I am fetching data from a MySQL table using the IP provided in the box. This data is being loaded into a DataSet
. Since last 10 hours, I've played around with displaying them into each one of these:
Putting them in the remaining part of the form windows. But both the outputs were not what I wanted them to be. One of the columns I am fetching is a VARCHAR
ranging up to 190 chars
. The final results in both the cases was not quite easy to read, which brings me to my question.
So, now I am thinking of showing the text inside a GroupBox
, with a vertical scroll-bar. The data from the DataSet
can be displayed inside a Label
or LinkLabel
depending on the requirements.
Is this method feasible(time-optimization)? Is there some other kind of box/view which can satisfy my conditions? I'll be fetching and displaying at-most 225 rows from main table and at least 2 links for each of them fetched from another table(inside the foreach
loop).
Please suggest me any other optimal solution for this job. Also, how can I add 200+ labels to a GroupBox
and make the box vertically scrollable. As far as I can see in Visual Studio 2010, anything like VerticalScroll
property doesn't exist for GroupBox
.
Add a panel to Groupbox it has the Scrollable property or you can achieve it through RichTextBox
Put everything inside an auto-sizing groupBox (AutoSize = True
) and throw that groupBox inside a panel with the auto-scroll set (AutoScroll = True
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With