Board index » delphi » List Box - How much resources used

List Box - How much resources used

I have an app that requires a fair number of data stream "monitors"
These need to act much like terminal windows with scroll back, color and
selection of lines to cut.

Although I will only have two visible at a time, I may need 10-20 in
memory.

I have considered a few approaches:

1) Make my own ring buffer containing lines of data (text lines), roll
my own paint, scroll and select routines.

2) Use owner drawn list boxes for each stream. Only two would be
visible. After a certain number of lines are in the listbox, start
removing them from the top as new lines are added.

3) A hybred approach. Buffer each stream with my own code and empty/load
the two visible list boxes as a monitor port is selected.

Any comments or suggestions on performance or memory footprint would be
appreciated. I haven't seen a discussion of how resource intensive list
boxes are, how long it takes to load one or how fast they are,

Thanks in advance

gerry.g

 

Re:List Box - How much resources used


I had a case where I needed a list box to display binary data but decoded
to ascii in a variety of choose-on-the-fly formats.

The way I did it was to put a load of labels on a WIDE white panel in a
normal grey panel.

Horizontal scrolling is done by chasngeing the LEFT value of the wide
panel according to a scrollbar.

Because I had no idea when each line was to begin, unless the vertical
scrollbar was at 0 (beginning of file) I would pipe the file through the
decoder until the decoder signalled a new line, and then start putting
decoded data into the captions of the labels.

Because I had no idea where a line might begin, the vertical scrollbar
measured offsets into the file, in bytes.  The windows sacrollbar only
has integer values, so I wrote my own scrollbar based in Delphi's
encapsulation of the windows scrollbar, but allowing longinteger values.

Part of the problem was that the user is able to view the file before it
has been completely filled.  Data arrives from a datalogger and the file
grows as it is viewed.

Quote
On Mon, 18 Dec 1995, gerry.g wrote:
> I have an app that requires a fair number of data stream "monitors"
> These need to act much like terminal windows with scroll back, color and
> selection of lines to cut.

> Although I will only have two visible at a time, I may need 10-20 in
> memory.

> I have considered a few approaches:

> 1) Make my own ring buffer containing lines of data (text lines), roll
> my own paint, scroll and select routines.

> 2) Use owner drawn list boxes for each stream. Only two would be
> visible. After a certain number of lines are in the listbox, start
> removing them from the top as new lines are added.

> 3) A hybred approach. Buffer each stream with my own code and empty/load
> the two visible list boxes as a monitor port is selected.

> Any comments or suggestions on performance or memory footprint would be
> appreciated. I haven't seen a discussion of how resource intensive list
> boxes are, how long it takes to load one or how fast they are,

> Thanks in advance

> gerry.g

--
Sam Liddicott                  |   Nothing I say is to be attributed as
Campbell Scientific Ltd.       | a company statement or representation.
14-20 Field Street, Shepshed,  *----------------------------------------
Leicestershire,                             Phone: +44 (0) 1509 601141
United Kingdom. LE12 9AL                    Fax:   +44 (0) 1509 601091

Other Threads