Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
popupMenu: m["xx"] has id=0
#2
To detect Cancel can be used m.Result.

Code:
Copy      Help
var m = new popupMenu();
m["x1"] = o => { print.it(o.Id); }; //no id
m.Add(5, "Explicitly set id");
m.Add("Auto-generated id");
m.Add("Explicitly set id", o => { print.it(o.Id); }).Id = 100;
int sel = m.Show();
print.it(sel, m.Result); //m.Result null if canceled


Messages In This Thread
popupMenu: m["xx"] has id=0 - by MBaas - 03-07-2024, 07:02 AM
RE: popupMenu: m["xx"] has id=0 - by Gintaras - 03-07-2024, 08:31 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)