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 » ArrayCtrl: how to set label for embedded controls?
Re: ArrayCtrl: how to set label for embedded controls? [message #13916 is a reply to message #13915] Fri, 01 February 2008 17:42 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Well, there is the obvious way Smile
arrayCtrl.AddColumn();
arrayCtrl.AddColumn().Ctrls<Option>();
arrayCtrl.Add("Option 1", true);
arrayCtrl.Add("Option 2", true);
arrayCtrl.Add("Option 3", false);


But if you want ot make things difficult for yourself:
// Members
ArrayCtrl array;
Array<Option> options;

...
array.AddColumn("Options");
array.Add(true);
array.Add(true);
array.Add(false);

array.SetCtrl(0, 0, options.Create<Option>().SetLabel("Option 1"), true);
array.SetCtrl(1, 0, options.Create<Option>().SetLabel("Option 2"), true);
array.SetCtrl(2, 0, options.Create<Option>().SetLabel("Option 3"), true);

I believe there are also others (you could use a factory for instance).

[Updated on: Fri, 01 February 2008 17:44]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: EditDouble causes crash in GridCtrl
Next Topic: ArrayCtrl with ProgressIndicator [SOLVED]
Goto Forum:
  


Current Time: Wed Jun 25 10:06:46 CEST 2025

Total time taken to generate the page: 0.07114 seconds