mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 22:02:49 -06:00
.reference (replaced THISBACKs)
This commit is contained in:
parent
baff766249
commit
8fc23a3bf3
43 changed files with 106 additions and 3313 deletions
|
|
@ -4,20 +4,15 @@ using namespace Upp;
|
|||
|
||||
struct App : public TopWindow {
|
||||
DropGrid drop;
|
||||
|
||||
void Person() { PromptOK("Person!"); }
|
||||
void Client() { PromptOK("Client!"); }
|
||||
void Select() { PromptOK("Select!"); }
|
||||
void List() { PromptOK(AsString(drop.GetKey())); }
|
||||
|
||||
App()
|
||||
{
|
||||
Sizeable().Zoomable();
|
||||
SetRect(Size(600, 100));
|
||||
SetRect(Size(Zx(600), Zy(100)));
|
||||
Title("DropGrid");
|
||||
|
||||
drop.ClearButton();
|
||||
drop.AddPlus(THISBACK(Action));
|
||||
drop.AddPlus([=] { PromptOK("Action!"); });
|
||||
|
||||
Add(drop.LeftPosZ(20, 350).TopPosZ(20, 19));
|
||||
|
||||
|
|
@ -25,9 +20,9 @@ struct App : public TopWindow {
|
|||
drop.AddColumn("Value");
|
||||
drop.AddColumn("Description");
|
||||
|
||||
drop.AddText("Add person", THISBACK(Person));
|
||||
drop.AddText("Add client", THISBACK(Client)).Left().SetImage(GridImg::Append());
|
||||
drop.AddSelect(THISBACK(Select)).Left();
|
||||
drop.AddText("Add person", [=] { PromptOK("Person!"); });
|
||||
drop.AddText("Add client", [=] { PromptOK("Client!"); }).Left().SetImage(GridImg::Append());
|
||||
drop.AddSelect([=] { PromptOK("Select!"); }).Left();
|
||||
|
||||
for(int i = 0; i < 20; i++)
|
||||
drop.Add(i, Format("Hello %d", i), Format("How are you mr Hello %d", i));
|
||||
|
|
@ -38,7 +33,7 @@ struct App : public TopWindow {
|
|||
drop.SetDropLines(15);
|
||||
drop.SetValueColumn(1);
|
||||
drop.AddValueColumn(0).AddValueColumn(1);
|
||||
drop <<= THISBACK(List);
|
||||
drop << [=] { PromptOK(AsString(drop.GetKey())); };
|
||||
}
|
||||
|
||||
typedef App CLASSNAME;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue