2
0

minput.pp 719 B

1234567891011121314151617181920212223242526272829
  1. program minput;
  2. uses xforms;
  3. procedure input_cb( ob : PFL_OBJECT; data : Longint);cdecl;
  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.