LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Scroll in table

Hi everybody
anyone knows how to capture a scroll event in a table ???

I need to populate a table with a lot of rows, but it is so slowly, so i
tought to load only 50 rows at time.
I show only 25 rows and i'd like that when i scroll for 10 rows the table, i
clear table and populate again with new 50 rows and move right row like
first of table.
Any suggest ??
is it possible ???

Thank's
Marco


0 Kudos
Message 1 of 6
(4,310 Views)
Unfortunately, events are not currently sent when a table is scrolled.

However, CVI includes a scrollbar custom control that you can use to display a fake scrollbar next to the table (you would then hide the table's own scrollbar). You can then respond to the events that this scrollbar sends, and update your table as needed.

There is an example program, samples\userint\custctrl\scrollbar\scrollsample.prj that you can look at to see if it meets your needs.

Luis
NI
0 Kudos
Message 2 of 6
(4,299 Views)
Hi LuisG
I just tied this solution succefully, but i used a numeric control. but now
i'm trying scrollbar control.
Thank's a lot for your suggest

Marco


0 Kudos
Message 3 of 6
(4,292 Views)
Hello Marco,
 
You say populating your table is going very slowly. I suppose you are using the function SetTableCellVal in some kind of loop. This causes the table to be redrawn every time this function is executed.  Try using SetTableCellAttribute with ATTR_CTRL_VAL. This avoids the redrawing and is much faster. You can insert a ProcessDrawEvents() after all table cells are assigned a value.
0 Kudos
Message 4 of 6
(4,272 Views)
Good suggestion...
i'm tried this immediatly.
Thank's Wim S

"Wim S" <x@no.email> ha scritto nel messaggio
news:1145565619169-354762@exchange.ni.com...
> Hello Marco,
> &nbsp;
> You say populating your table is going very slowly. I suppose you are
> using the function SetTableCellVal in some kind of loop. This causes the
> table to be redrawn every time this function is executed.&nbsp; Try using
> SetTableCellAttribute with ATTR_CTRL_VAL. This avoids the redrawing and is
> much faster. You can insert a ProcessDrawEvents() after all table cells
> are assigned a value.


0 Kudos
Message 5 of 6
(4,259 Views)
It's right 😉
in this way i can scroll table with around 3000 records in same time of old
version and 500 records.
Thank you


0 Kudos
Message 6 of 6
(4,257 Views)