minput.pp 1020 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. program minput;
  2. uses xforms;
  3. procedure input_cb( ob : PFL_OBJECT; data : Longint);export;
  4. var
  5. x, y : Longint;
  6. begin
  7. fl_get_input_cursorpos(ob, @x , @y);
  8. writeln ('x= ',x,' y= ',y);
  9. end;
  10. var
  11. form : PFL_FORM;
  12. but, obj : PFL_OBJECT;
  13. begin
  14. fl_initialize(@argc, argv, 'FormDemo', nil, 0);
  15. form := fl_bgn_form(FL_UP_BOX,400,450);
  16. obj := fl_add_input(FL_MULTILINE_INPUT,30,270,340,150,'');
  17. obj := fl_add_input(FL_MULTILINE_INPUT,30,90,340,150,'');
  18. fl_set_object_lsize(obj, FL_NORMAL_SIZE);
  19. but := fl_add_button(FL_NORMAL_BUTTON,160,30,80,30,'Exit');
  20. fl_end_form();
  21. fl_show_form(form,FL_PLACE_CENTERFREE,FL_FULLBORDER,'MultiLineInput');
  22. while (obj <> but) do obj:=fl_do_forms;
  23. end.
  24. {
  25. $Log$
  26. Revision 1.3 2003-10-27 15:48:13 peter
  27. * renamed forms unit to xforms to prevent conflict with Forms
  28. from the LCL
  29. Revision 1.2 2002/09/07 15:42:57 peter
  30. * old logs removed and tabs fixed
  31. Revision 1.1 2002/01/29 17:55:01 peter
  32. * splitted to base and extra
  33. }