Advertisement
idsystems

CPP_RAD_Ejercicio15

May 18th, 2012
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. /* ej15_ScrollBars
  2. Ejemplo para el manejo de ScrollBars en una ventana */
  3. #include <radc++.h>
  4.  
  5. Form      form1("ScrollBar 1 - RAD C++ Ejemplo");
  6. ScrollBar scr(AUTO_ID,20, 20,20,200,form1,RCP_VERTICAL);
  7.  
  8. FormProcedure proc(FormProcArgs) {
  9.     ON_SCROLL_CHANGE(scr) {
  10.         LONG pos = scr.position; //get scrollbar position
  11.         form1.caption = str(pos);
  12.     }
  13.  
  14.     ON_CLOSE()
  15.         Application.close();
  16.     return 0;
  17. }
  18.  
  19. rad_main()
  20.         form1.procedure = proc;
  21.         //to set custom scrollbar range
  22.         //scr.setRange(1,100); [min, max]
  23. rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement