Home » Community » Newbie corner » OptionTree inside a DropTree
Re: OptionTree inside a DropTree [message #53563 is a reply to message #53560] |
Sun, 12 April 2020 14:46 |
omari
Messages: 266 Registered: March 2010
|
Experienced Member |
|
|
GUI_APP_MAIN
{
PopUpTable list;
list.AddColumn("");
list.SetDropLines(9);
for(int i = 0; i < 7; i++){
list.Add();
list.CreateCtrl<Option>(i, 0, false).SetLabel("Option " + AsString(i));
}
Button x;
x.WhenAction = [&]{list.PopUp(&x);};
Button y;
y.WhenAction = [&]{
String r;
for(int i = 0; i < list.GetCount(); i++)
{
Option* o = (Option*)list.GetCtrl(i, 0);
if(o && *o)
r << (o->GetLabel()) << "&";
}
PromptOK(r);
};
TopWindow w;
w.Add(x.LeftPos(20, 200).TopPos(50, 24));
w.Add(y.LeftPos(20, 200).TopPos(150, 24));
w.Run();
}
regards
omari.
|
|
|
Goto Forum:
Current Time: Tue May 28 21:34:48 CEST 2024
Total time taken to generate the page: 0.01927 seconds
|