473,507 Members | 2,545 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to optimize User interface creation

19 New Member
Hello,

I'm building an interface showing many users controls (mainly Labels and Buttons) but the result is rather slow.

Here is a basic sample of the code:

Expand|Select|Wrap|Line Numbers
  1. Panel myPanel = new Panel();
  2.  
  3. int nbrPPL=15;
  4. for (int k=0; k < nbrPPL; k++)
  5. {
  6.    Case[k] = new Label();
  7.    Case[k].Location=...
  8.    Case[k].Size=...
  9.    Case[k].Name=...
  10.  
  11.    CaseH[k] = new Label();
  12.    CaseH[k].Location=...
  13.  
  14.    CaseT[k] = new Label();
  15.    CaseT[k].Location=...
  16.  
  17.    myPanel.Controls.Add(Case[k]);
  18.    myPanel.Controls.Add(CaseT[k]);
  19.    myPanel.Controls.Add(CaseH[k]);
  20.  
  21. }
  22.  
  23. Controls.Add(myPanel);
  24.  
  25.  
Could you please advise on the best way to optimize my code ?

Thank you
Aug 27 '10 #1
4 1949
Aimee Bailey
197 Recognized Expert New Member
Why not use a control that is designed to deal with a lot of data like the DataGridView? :) that will allow you to have buttons next to each person.

Aimee.
Sep 4 '10 #2
siilexx
19 New Member
Hello,
I'm using both buttons and label on the same line, and different color on each line which can be changed dynamically by the user (see this screenshot ).

Do you think that a DataGridView could handle this easily ?

Thank you
Sep 4 '10 #3
Aimee Bailey
197 Recognized Expert New Member
Most of what you are doing there can be done using the DataGridView hun, also on a side note, if you wanted more customization, you may find WPF a wonderful route to take seeing as it uses directx to draw its interface.

Aimee
Sep 4 '10 #4
siilexx
19 New Member
Do you have some kind of tutorial explaining how to use or create controls similar to a windows form "Label" using directx ?
Thank you
Jan 25 '11 #5

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

Similar topics

8
2580
by: Eric Veltman | last post by:
Hello everyone, I've posted this question before, but got no answer, so I'll try to reformulate the question, maybe it helps :-) By the way, this is not intended as the start of an ASP.NET...
11
4962
by: Maxim Kasimov | last post by:
Hi. Are there widely used and recommended Python libraries that will let me makes a portable text user interface? -- Best regards, Maxim
1
1379
by: authorking | last post by:
I'm a beginer with c#. I want to make a perfect user interface for my program project. but I can't design the user interface properly, so I want to know where to fine some tips about program's user...
3
4111
by: zlst | last post by:
Many technological innovations rely upon User Interface Design to elevate their technical complexity to a usable product. Technology alone may not win user acceptance and subsequent marketability....
0
1397
by: uiblog | last post by:
Hi everybody, The User Interface Community is a new message board for discussions about design, human-computer interactions, patterns, usability... Please have a look at it and let me know what...
6
2187
by: Andre Ranieri | last post by:
Hello everyone, I'm wondering if I could get some advice on the best way to build the user interface depicted in this diagram: http://www.senske.com/images/winforms_layout.jpg The gray areas...
1
1124
by: mscertified | last post by:
Is there any documentation on what user interface elements dot.net supports. I'm not interested in any implementation details, only what controls there are and what they can do regarding a user...
9
2930
by: Spam Catcher | last post by:
Hi all, Can anyone recommend any books for User Interface Engineer for Windows Forms application? At the company I work at, we've gone GUI component happy. Basically GUI tools (i.e....
1
2493
by: wojtek | last post by:
Hi all! I am wondering if it the right place to post this kinda question but I am looking for a tutorial/sdk/manual/whatever to write a c/C#/whatever application for a pppoe interface creation in...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7110
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7314
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,...
1
7030
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...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.