yesno.pp 914 B

12345678910111213141516171819202122232425262728293031323334353637
  1. Program yesno;
  2. {
  3. A box with two buttons and a string. Simple boxes like this
  4. are very usefull for asking questions
  5. }
  6. Uses xforms;
  7. var
  8. form : PFL_FORM;
  9. yes,no : PFL_OBJECT;
  10. begin
  11. fl_initialize(@argc, argv, 'FormDemo', nil, 0);
  12. form := fl_bgn_form(FL_UP_BOX,320,120);
  13. fl_add_box(FL_NO_BOX,160,40,0,0,'Do you want to quit ?');
  14. yes := fl_add_button(FL_NORMAL_BUTTON,40,70,80,30,'Yes');
  15. no := fl_add_button(FL_NORMAL_BUTTON,200,70,80,30,'No');
  16. fl_end_form;
  17. fl_show_form(form,FL_PLACE_MOUSE,FL_TRANSIENT,'Question : ');
  18. while (fl_do_forms <> yes) do;
  19. fl_hide_form(form);
  20. end.
  21. {
  22. $Log$
  23. Revision 1.3 2003-10-27 15:48:13 peter
  24. * renamed forms unit to xforms to prevent conflict with Forms
  25. from the LCL
  26. Revision 1.2 2002/09/07 15:42:57 peter
  27. * old logs removed and tabs fixed
  28. Revision 1.1 2002/01/29 17:55:02 peter
  29. * splitted to base and extra
  30. }