Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ej29_SplitterHorizontal
- Otro ejemplo de splitter, pero esta vez de manera horizontal */
- #include <radc++.h>
- Form form1("Horizontal Splitter - RAD C++ Ejemplo");
- Splitter s(AUTO_ID,form1,RCP_HORIZONTAL);
- TextBox t1("Una caja de texto",AUTO_ID,0, 0,10,100,form1);
- Button t2("Un boton", AUTO_ID,0,105,10,10 ,form1);
- FormProcedure proc(FormProcArgs) {
- ON_CLOSE() Application.close();
- ON_SPLITTER_CHANGE(s) {
- t1.height = splitPosition(); //macro that gets current moving splitter's position
- t2.top = splitPosition()+5;
- t2.height = form1.cheight - (t1.height+5);
- }
- ON_RESIZE( ) { //adjust all objects wen form is resized
- t1.fitToWidth();
- t2.fitToWidth();
- t2.height = form1.cheight - (t1.height+5);
- s.fitToWidth();
- s.setBounds(50,form1.cheight-50);
- }
- return 0;
- }
- rad_main()
- s.setPosition(100); //set splitter's position
- form1.procedure = proc;
- s.refresh();
- form1.resize(500,250);
- form1.center();
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement