Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
forlano is currently offline  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 #10413 is a reply to message #10412] Sat, 07 July 2007 16:34 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
No Message Body

[Updated on: Sat, 07 July 2007 16:45]

Report message to a moderator

Re: Multiselect and contiguous cells in ArrayCtrl [message #10414 is a reply to message #10412] Sat, 07 July 2007 17:55 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
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(...);
		}
	}
Re: Multiselect and contiguous cells in ArrayCtrl [message #10415 is a reply to message #10414] Sat, 07 July 2007 20:21 Go to previous message
forlano is currently offline  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

Previous Topic: GridCtrl Resize Bug
Next Topic: GridCtrl and non contigous cells
Goto Forum:
  


Current Time: Mon Apr 29 09:47:30 CEST 2024

Total time taken to generate the page: 0.05161 seconds