473,320 Members | 2,177 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,320 software developers and data experts.

adding components ....

Hello,

I'm wanting to add 320,000 controls(Panels) to an instantiated Panel
object. Yes, you heard me right, 320,000. It's for displaying a
320,000 int buffer memory status. Long story. Anyway, the controls
Add() method is way to slow for this. AddRange() isn't any better.
Probably adding that many little Panels to the controls array for the
main Panel is problematic. Anybody got any better ideas?

TIA
Oct 18 '08 #1
3 1030
On Sat, 18 Oct 2008 15:36:06 -0700, <te***@cfl.rr.comwrote:
I'm wanting to add 320,000 controls(Panels) to an instantiated Panel
object. Yes, you heard me right, 320,000. It's for displaying a
320,000 int buffer memory status. Long story. Anyway, the controls
Add() method is way to slow for this. AddRange() isn't any better.
Probably adding that many little Panels to the controls array for the
main Panel is problematic. Anybody got any better ideas?
Yes. Don't do that.

One Control instance per buffer element is a wholely inappropriate use of
the Control class.

If you can arrange things so that you only ever are displaying some very
small number of buffer elements at a time (a few dozen at most is probably
reasonable), then you can essentially virtualize the display, updating the
visible controls as appropriate for whatever buffer elements you want to
present to the user at any given moment.

If that's not feasible, then you should write a custom control that
displays the buffer element status directly in a single control.

Hundreds of thousands of controls are a bad idea, even when spread across
multiple windows. Hundreds of thousands of controls in a single window is
just ridiculous.

Pete
Oct 18 '08 #2
Yeah I second that motion. It's ridiculous. I don't even know if an
average size screen has 320000 pixels on it... But if it does, you can
turn on and off every pixel, using a library function that I'm sure is
available...

RL

Peter Duniho wrote:
Hundreds of thousands of controls are a bad idea, even when spread across
multiple windows. Hundreds of thousands of controls in a single window is
just ridiculous.
Oct 18 '08 #3
raylopez99 wrote:
Yeah I second that motion. It's ridiculous. I don't even know if an
average size screen has 320000 pixels on it
1024x768 (that is rather small these days) would have, well, approx.
768,000 pixels already. <g>

But 320,000+ panels would bring the system down, no doubt. I doubt
Windows can handle so many windows. <g>
--
Rudy Velthuis http://rvelthuis.de

"Sometimes I lie awake at night, and I ask, 'Where have I gone
wrong?' Then a voice says to me, 'This is going to take more
than one night.'" -- Charlie Brown.
Oct 19 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: filip stas | last post by:
How do i add references during runtime?
0
by: Dave Elliott | last post by:
After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is after the newly added row without getting bizarre results. I have added the...
2
by: Chien Lau | last post by:
I frequently define internal UserControl-derived classes in my WinForms apps: internal class MyUserControl:UserControl{ ... } I'll often need to embed these controls in a Form, whose class...
3
by: Casper | last post by:
Hi .Net experts, I am trying to build a user control of textbox and would like to add a public method to the object like public void CheckOptions(string str) { // codes here }
6
by: cpnet | last post by:
I've authored a custom web component (a non-ui component kinda like a DataSet) and so far it's working. When my web component is added to the web form in the designer from the toolbox, the...
2
by: Flack | last post by:
Hey guys, I have a DataGrid and DataTable field in my class : private ImageDataGrid dataGrid1; //ImageDataGrid extends dataGrid and just overides OnMouseDown private DataTable dt = new...
1
by: npaulus | last post by:
Hi, I am trying to dynamically add user controls on to my web form but for some reason my form isnt displaying the user control. form1.cs: using System; using System.Drawing; using...
5
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
4
by: Dinsdale | last post by:
I'm looking at adding scheduling features to an application and I wanted to ask the community about any experience with scheduling components, either open source like from code project or from a...
21
by: John Henry | last post by:
Hi list, I have a need to create class methods on the fly. For example, if I do: class Dummy: def __init__(self): exec '''def method_dynamic(self):\n\treturn self.method_static("it's...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.