LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SetTableSelection

Hi

How can I set table selection over multiple rows when the SHIFT key is pressed.

 

Currently the code is like this.

 

case EVENT_ACTIVE_CELL_CHANGE :
case EVENT_SELECTION_CHANGE :
     GetActiveTableCell(panel,control,&cell);
     SetTableSelection(panel,control,MakeRect(OldRow,1,NewRow,11));

 

I do get the events when the SHIFT key is pressed but the row number is not updated.

Regards Per

0 Kudos
Message 1 of 5
(3,774 Views)

Hello Per,

 

The 3rd argument to MakeRect is supposed to be the height of the rect -- i.e. the number of rows in your selection. The fact that you named this variable "NewRow" makes me wonder if that's really what you are expecting it to be. You should double-check that the rect you're creating really is correct.

 

Luis

0 Kudos
Message 2 of 5
(3,754 Views)

I'm aware of that. Lets use the psudo code

SetTableSelection(panel,control,MakeRect(Row,1,NumberOfRows,11));

0 Kudos
Message 3 of 5
(3,729 Views)

In that case, I'm out of ideas. Would you be able to attach a stripped down version of your program that reproduces the problem?

 

Luis

0 Kudos
Message 4 of 5
(3,709 Views)

Hi Luis

While stripping down the code I found out of it. The range selection with the SHIFT key is allready built in.

I overrided it with my code. Now that I get the range with  GetTableSelection()

and then sets a new range to include all collums with SetTableSelection() it works fine.

0 Kudos
Message 5 of 5
(3,701 Views)