Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ej45_ScrollBars2
- Ejemplo de ScrollBars */
- #include <radc++.h>
- Form form1("Scroll Bars 2 - RAD C++ Ejemplo");
- Label label("Mover la scrollbar con el raton",-1,100,35,200,20,form1);
- //create scrollbars
- ScrollBar scroll1(AUTO_ID,100,80,200,25,form1,RCP_HORIZONTAL); //horizontal
- ScrollBar scroll2(AUTO_ID,190,120,25,100,form1,RCP_VERTICAL); //vertical
- FormProcedure proc(FormProcArgs) {
- ON_CLOSE() Application.close();
- ON_SCROLL_CHANGE(scroll1)
- label.caption = str(scroll1.position);
- ON_SCROLL_CHANGE(scroll2)
- label.caption = str(scroll2.position);
- return 0;
- }
- rad_main()
- form1.procedure = proc;
- //set scrollbar minimum and maximum range
- scroll1.minRange = -100;
- scroll1.maxRange = 100;
- //you can also use scroll1.setRange(-100,100);
- //NOTE if you do not set range, it is 1 minimum to 100 maximum automatically
- //set scrollbar default position
- scroll1.position = -50;
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement