Advertisement
idsystems

CPP_RAD_Ejercicio43

Jun 21st, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1. /* ej43_ProgressBar
  2. Ejemplo para usar el control ProgressBar */
  3. #include <radc++.h>
  4.  
  5. Form        form1("Progres Bar - RAD C++ Ejemplo");
  6.  
  7. ProgressBar pgb1(-1,100,50,200, 20,form1,RCP_HORIZONTAL); //horizontal
  8. ProgressBar pgb2(-1,100,80, 20,100,form1,RCP_VERTICAL);   //vertical
  9.  
  10. Label       lbl("Introduzca porcentaje",AUTO_ID,180,100,120,20,form1);
  11. NumberBox   txt("50",AUTO_ID,180,120,120,25,form1);
  12. Button      btn("Ponga Porcentaje %",AUTO_ID,180,155,120,25,form1);
  13.  
  14. FormProcedure proc(FormProcArgs) {
  15.     ON_CLOSE() Application.close();
  16.    
  17.     ON_COMMAND_BY(btn) { //set percentage as per value of txt.text
  18.         pgb1.percent=val(txt.text);
  19.         pgb2.percent=val(txt.text);
  20.     }
  21.  
  22.     return 0;
  23. }
  24.  
  25. rad_main()
  26.  
  27.     form1.procedure = proc;
  28.    
  29.     //set numberbox digits limit
  30.     txt.setLimit(3); //3 digits
  31.    
  32. rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement