473,394 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

C# - Adding over 200 labels to a form using arrays

Hello

What I am trying to is to add over 200 labels to a single form.
I've been messing around with this for a couple of days but I seem to be getting anywhere.

here is what I got so far that actually works :) :

label1 = new Label[243];

Now I just need to add the buttons to the form and set locations etc.

Thank you
Oct 5 '07 #1
6 1772
nateraaaa
663 Expert 512MB
Why do you need so much information on a single form? Wouldn't the application flow much better if you break the info required into smaller pieces over multiple pages?

Just a thought.

Nathan
Oct 5 '07 #2
Why do you need so much information on a single form? Wouldn't the application flow much better if you break the info required into smaller pieces over multiple pages?

Just a thought.

Nathan
I am making a ticket booking system for school and I need to be able to show the available and unavailable seats
Oct 5 '07 #3
nateraaaa
663 Expert 512MB
So why do you need labels? Couldn't you show the available/unavailable seats using a datagrid or gridview? You could show a grid of all available seats, another grid of unavailable seats, or a grid with all seats (available and unavailable).

Nathan
Oct 5 '07 #4
Plater
7,872 Expert 4TB
Why do you need so much information on a single form? Wouldn't the application flow much better if you break the info required into smaller pieces over multiple pages?
I ask this question like once a week.


I am going to go ahead just tell you, 200 labels is a bad idea. You performance will be very slow. Plus it looks unprofesional in comparison to some auto-created objects.

Is this for a web or windows application?
Oct 5 '07 #5
I ask this question like once a week.


I am going to go ahead just tell you, 200 labels is a bad idea. You performance will be very slow. Plus it looks unprofesional in comparison to some auto-created objects.

Is this for a web or windows application?
Yeah I thought so I just couldn't think of another way to do this.
Think you could give some part of a code to get me started.
thanks
Oct 7 '07 #6
Plater
7,872 Expert 4TB
If this is for web, look at the "GridView" object. It supports all kinds of fancy customization, and you can just give it a data source and have it build itself.

If this is a windows application, there is DataGridView, or CheckedListBox (I think).
Oct 8 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Chris Coho, Jr. | last post by:
Ok, I'll explain the whole problem because there may be several ways to solve this and hopefully someone knows one. What I'm doing is creating a specialty template editor, similar to say a corel...
4
by: Dalan | last post by:
I have been using a module for printing labels in Access 97, and although it works fine, I would like to add a small enhancement to it. The module allows for setting the number of labels to print...
3
by: Circe | last post by:
In vb excel i can load a form and write this code for adding labels that i need during program execution Set l = frmOrders.Controls.Add("Forms.Label.1") With l .Caption = "January" .FontBold...
3
by: Ken McCrory | last post by:
I have a web form page (.aspx) with 95 label controls that I now need to be text boxes. Is there an easy way to change those to what I want using something like a find and replace or am I stuck...
1
by: Frank | last post by:
Hello, I hope this is the correct group to ask this question. I am fairly new to programming, but have a gut feeling this is a pretty easy problem to overcome. I hope I can explain the problem...
1
by: ashima515 | last post by:
Hi I have made an asp.net form just using textboxex, labels n buttons. I want to make my page more attractive. Like on the top I want to add a colorful bar that will contain the title of my form....
8
markryan57
by: markryan57 | last post by:
Greetings, I searched for this, but cannot find exaclty what I am looking for. I am trying to dynamically create labels on a form just before it opens. I am reading from a database, building the...
3
by: gediko | last post by:
hi all, i am creating a series of labels, which the number of labels is defined by the user. dim labels( ) as label after learning the number, redim labels(i) then i am changing their...
1
by: CapRand | last post by:
Hi, I am creating an ASP.NET site and have created a form which I have been able to dynamically with listboxes, labels etc from a database - using mainly form1.Controls.Add ..... Does anyone...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.