Author Topic: new command: popup  (Read 1719 times)

0 Members and 1 Guest are viewing this topic.

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1208
    • View Profile
new command: popup
« on: December 16, 2020, 12:11:52 PM »
from the help:

[popup]
Syntax: popup(int x, int y, char options[$], label onclick, char default);
Action: present a popupmenu. If default >= 0 that entry will be selected.

Example:
Code: [Select]
window(666, 666);
char s[99];
int n;
button(0,0, "Test", test);
run;

:test;
  popup(99, 99, "one|two|three", test1);
  return;

:test1;
  strset(s, "%d %d", n, menunumber);
  setcaption(s);
  n += 1;
  return;
Greetings from Groningen Netherlands.

ABer

  • Administrator
  • Hero Member
  • *****
  • Posts: 1126
    • View Profile
Re: new command: popup
« Reply #1 on: December 16, 2020, 06:15:50 PM »
That's cool Jean - thanks very much for this new function. Ed

Jean

  • Administrator
  • Hero Member
  • *****
  • Posts: 1208
    • View Profile
Re: new command: popup
« Reply #2 on: December 16, 2020, 07:20:07 PM »
Thanks, added a parameter for if you want one item radio-checked.
Eventually it could also have checkboxes for all items, it would then need an extra parameter for an array of chars 0/1.
Greetings from Groningen Netherlands.