Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ej28_SplitterVertical
- Ejemplo de control Splitter en formato Vertical */
- #include <radc++.h>
- Form form1("Splitter Vertical - RAD C++ Ejemplo");
- Splitter s(AUTO_ID,form1);
- TextBox t1("Una caja de texto",AUTO_ID,0, 0,100,10,form1);
- Button t2("Un boton", AUTO_ID,105,0,200,10,form1);
- FormProcedure proc(FormProcArgs) {
- ON_CLOSE() Application.close();
- ON_SPLITTER_CHANGE(s) { //s is splitter varible
- t1.width = splitPosition();
- t2.left = splitPosition()+5;
- t2.width = form1.cwidth - (t1.width+5);
- }
- ON_RESIZE( ){
- t1.fitToHeight();
- t2.fitToHeight();
- t2.width = form1.cwidth - (t1.width+5);
- s.fitToHeight();
- s.setBounds(50,form1.cwidth-50);
- }
- return 0;
- }
- rad_main()
- s.setPosition(100);
- form1.procedure = proc;
- s.refresh();
- form1.resize(500,400); //resize form
- form1.center(); //center form on screen
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement