Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Multiselect and contiguous cells in ArrayCtrl
Multiselect and contiguous cells in ArrayCtrl [message #10412] |
Sat, 07 July 2007 14:28 |
|
forlano
Messages: 1185 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
Hello,
in an arrayctrl I've enabled multiselect rows. Selecting one row and then with SHIFT+arrow_UP or arow_DOWN I can select contiguous cells. I wonder if it is possible to select non contiguous cells. I was not able to do it.
I was not able to found a method that returns the indexes of the selected rows. I tried to scan the whole array and test with IsSelected(i) each row but without success.
Moreover it seems that the selection is lost when I open another windows. Is it normal.
Luigi
[Updated on: Sat, 07 July 2007 16:46] Report message to a moderator
|
|
|
|
|
Re: Multiselect and contiguous cells in ArrayCtrl [message #10415 is a reply to message #10414] |
Sat, 07 July 2007 20:21 |
|
forlano
Messages: 1185 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
zsolt wrote on Sat, 07 July 2007 17:55 |
Quote: | I was not able to found a method that returns the indexes of the selected rows.
|
this is working for me:
for(int i=0; i<m_array.GetCount(); i++)
{
if(m_array.IsSelected(i))
{
DoSomething(...);
}
}
|
Thanks, it works. But in my program something strange is happening. Now I'm playing with the ArrayCtrl package of the reference and I see that I can select even non contiguous cells with CTRL key while I'm not able to do it in my prog!
I need to investigate better...
***
In my prog each time a row is selected then the field are copied in some other ctrls. I suspect this break the continuity of the action performed on the arrayctrl so I can't use CTRL key to operate a non contiguous selection...
***
Yes, it is my prog and not the library. Even SHIFT key work Ok in multiselection mode.
Luigi
[Updated on: Sat, 07 July 2007 20:52] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed May 15 03:52:25 CEST 2024
Total time taken to generate the page: 0.02476 seconds
|