Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ej51_CoolBars
- Ejemplo de varios controles colocados en barras de herramientas */
- #include <radc++.h>
- Form form1("Cool Bars / Rebar - RAD C++ Ejemplo");
- //create three controls that we will add to the coolbar
- //NOTE : controls will report to form on events so parent of controls must be form1
- ComboBox combo("Soy un combo", AUTO_ID,0,0,70,100,form1);
- CheckBox check("Soy un check", AUTO_ID,0,0,100,25,form1);
- Button btn("Soy un boton",AUTO_ID,0,0,120,25,form1);
- Radio radio("Soy un radio", AUTO_ID,0,0, 70,25,form1);
- //create a coolbar
- CoolBar cool(AUTO_ID,form1);
- //main form procedure
- FormProcedure proc(FormProcArgs) {
- ON_CLOSE() Application.close();
- //adjust coolbar properly on form, when form is resized
- ON_RESIZE()
- cool.adjust();
- return 0;
- }
- rad_main()
- form1.procedure = proc;
- //add bands to coolbar
- cool.add("",combo);
- cool.add("",check);
- //add band on new line
- cool.add("",btn, RCP_NEWBAND);
- //add band with custom caption 'Extra' with text color blue, color in hex 0xFF0000
- cool.add("Extra",radio,RCP_SAME,0xFF0000);
- //RCP_SAME means add new band on same line
- //add some values to combo
- combo.add("Item1");
- combo.add("Item2");
- combo.select(0); //select first item in combo
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement