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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » How to add a three state button in an ArrayCtrl
How to add a three state button in an ArrayCtrl [message #2398] Tue, 11 April 2006 21:23 Go to next message
forlano is currently offline  forlano
Messages: 1194
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

with the line
	arr.AddColumn("Avail" "Avail?", 4).Ctrls<Option>();  

I've a nice TWO state option button in a coloumn of the arrayctrl. But I would like a THREE state option button.
I guess I must use - ThreeState(true) - somewhere.
I have put it in all position in the previous line, for example:

	arr.AddColumn("Avail" "Avail?", 4).Ctrls<Option>().ThreeState(true);  


but with no success. Any idea?
Thanks
Luigi
Re: How to add a three state button in an ArrayCtrl [message #2399 is a reply to message #2398] Tue, 11 April 2006 21:48 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
One piece is this:
void Avail3(One<Ctrl>& ctrl)
{
	ctrl.Create<Option>().ThreeState();
}

Re: How to add a three state button in an ArrayCtrl [message #2400 is a reply to message #2399] Tue, 11 April 2006 21:54 Go to previous messageGo to next message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
The second piece something like this:
	arr.AddColumn("Avail").Ctrls(Avail3);

try and tell if it works...

[Updated on: Tue, 11 April 2006 21:55]

Report message to a moderator

Re: How to add a three state button in an ArrayCtrl [message #2401 is a reply to message #2400] Tue, 11 April 2006 22:05 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1194
Registered: March 2006
Location: Italy
Senior Contributor
fudadmin wrote on Tue, 11 April 2006 21:54

The second piece something like this:
	arr.AddColumn("Avail").Ctrls(Avail3);

try and tell if it works...


YES! It works. Some day I'll understand why your way works and my not.
Luigi
Re: How to add a three state button in an ArrayCtrl [message #2404 is a reply to message #2401] Tue, 11 April 2006 22:23 Go to previous message
forlano is currently offline  forlano
Messages: 1194
Registered: March 2006
Location: Italy
Senior Contributor
forlano wrote on Tue, 11 April 2006 22:05

fudadmin wrote on Tue, 11 April 2006 21:54

The second piece something like this:
	arr.AddColumn("Avail").Ctrls(Avail3);

try and tell if it works...


YES! It works. Some day I'll understand why your way works and my not.
Luigi


By the way, the correct code line is:

	arr.AddColumn("Avail", "Avail?", 4).Ctrls(Avail3);   


With one argument in AddColumn() that button does not appear.
Thanks
Previous Topic: How to create a modal dialog
Next Topic: F2 tree editor...
Goto Forum:
  


Current Time: Sun Jul 14 07:12:18 CEST 2024

Total time taken to generate the page: 0.02105 seconds