07-30-2010 09:40 AM
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
07-30-2010 02:23 PM
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
07-31-2010 07:05 AM
I'm aware of that. Lets use the psudo code
SetTableSelection(panel,control,MakeRect(Row,1,NumberOfRows,11));
08-02-2010 10:18 AM
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
08-02-2010 11:02 AM
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.