Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » [Bug]ArrayCtrl,MultiSelect.In WhenSel callback, selection status of last selected row is incorrect
[Bug]ArrayCtrl,MultiSelect.In WhenSel callback, selection status of last selected row is incorrect [message #51750] |
Mon, 13 May 2019 15:53 |
Maginor
Messages: 44 Registered: May 2019
|
Member |
|
|
Hi, I have an ArrayCtrl A with MultiSelect enabled.
I use the WhenSel callback to get notified when the selection status changes.
Inside my callback function I do
int RowCount = A.GetCount();
for(int Row = 0; Row < RowCount; ++Row)
{
if(A.IsSelected(Row))
{
//Do something
}
}
This works fine if there is only one row selected, but if there are multiple, IsSelected() returns false for the latest row that was selected.
I could also check if the row is the cursor (which works), but that will not give the desired behaviour when the cursor is on a deselected row (which it for instance is if you ctrl-click to deselect something).
Alternatively, is there a better way to iterate over the selected rows than I do here?
|
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 06:59:35 CEST 2024
Total time taken to generate the page: 0.02754 seconds
|