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 » GridCtrl and ThreeState option
GridCtrl and ThreeState option [message #33538] Mon, 22 August 2011 07:05 Go to next message
forlano is currently offline  forlano
Messages: 1064
Registered: March 2006
Location: Italy
Experienced Contributor
Hello,

I wanted a 3state Option in a column.
Using
grid.AddColumn("option").Option()
I got a simply two state.
Modifying the library method MakeOption and adding .ThreeState() the problem is resolved

static void MakeOption(One<Ctrl>& ctrl)
{
ctrl.Create<Option>().ThreeState().ShowLabel(false);
ctrl->SetData(0);
ctrl->WantFocus();
}

However I would ask to Daniel to consider adding a new method to get the ThreeState when desidered. For example

.Option(bool threestate=false)

Thanks,
Luigi
Re: GridCtrl and ThreeState option [message #33539 is a reply to message #33538] Mon, 22 August 2011 08:22 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1354
Registered: November 2005
Location: Poland
Senior Contributor

forlano wrote on Mon, 22 August 2011 01:05

Hello,

I wanted a 3state Option in a column.
Using
grid.AddColumn("option").Option()
I got a simply two state.
Modifying the library method MakeOption and adding .ThreeState() the problem is resolved

static void MakeOption(One<Ctrl>& ctrl)
{
ctrl.Create<Option>().ThreeState().ShowLabel(false);
ctrl->SetData(0);
ctrl->WantFocus();
}

However I would ask to Daniel to consider adding a new method to get the ThreeState when desidered. For example

.Option(bool threestate=false)

Thanks,
Luigi


Ok, why not Smile It will be in repository this evening
Re: GridCtrl and ThreeState option [message #33540 is a reply to message #33539] Mon, 22 August 2011 08:50 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1064
Registered: March 2006
Location: Italy
Experienced Contributor
unodgs wrote on Mon, 22 August 2011 08:22

forlano wrote on Mon, 22 August 2011 01:05

Hello,

I wanted a 3state Option in a column.
Using
grid.AddColumn("option").Option()
I got a simply two state.
Modifying the library method MakeOption and adding .ThreeState() the problem is resolved

static void MakeOption(One<Ctrl>& ctrl)
{
ctrl.Create<Option>().ThreeState().ShowLabel(false);
ctrl->SetData(0);
ctrl->WantFocus();
}

However I would ask to Daniel to consider adding a new method to get the ThreeState when desidered. For example

.Option(bool threestate=false)

Thanks,
Luigi


Ok, why not Smile It will be in repository this evening



Thank you! Smile
Re: GridCtrl and ThreeState option [message #33562 is a reply to message #33540] Tue, 23 August 2011 20:35 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1354
Registered: November 2005
Location: Poland
Senior Contributor

Finally in svn Smile
grid.AddColumn("Column").ThreeStateOption();
Re: GridCtrl and ThreeState option [message #41249 is a reply to message #33562] Mon, 18 November 2013 21:29 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi Daniel,

How about a function similar to Option() but Switch()?

This would work like option but it would look like switch and only one could be true at any one time for the whole column.

I normally would just setup and array of options and make them switch images but I am not sure how to handle the Insert function.

Cheers,

Nick
Previous Topic: Row autoheight with LineEdit
Next Topic: [BUG & FIX] [GridCtrl] Copy on GridCtrl with no selection will crash a program.
Goto Forum:
  


Current Time: Mon Sep 23 01:24:51 CEST 2019

Total time taken to generate the page: 0.02072 seconds