Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ej10_MenuPopUp
- Este ejemplo muestra como abrir un submenu
- dentro de una forma */
- #include <radc++.h>
- Form form1("Popup menu - RAD C++ Example");
- PopUpMenu popup;
- MenuItem i1,i2;
- FormProcedure form1Proc(FormProcArgs) {
- ON_CLOSE() Application.close();
- ON_RIGHT_CLICK() {
- popup.show(form1); //show at form 1
- }
- ON_COMMAND_BY(i1) form1.text = "i1";
- ON_COMMAND_BY(i2) form1.text = "i2";
- return 0;
- }
- rad_main()
- form1.procedure = form1Proc;
- i1 = popup.add("I am item 1",AUTO_ID);
- i2 = popup.add("I am item 2",AUTO_ID);
- popup.addSeparator();
- MenuItem n = popup.addPopup("oooh a popup menu"); //sub-menus not tracked
- n.add("Sub 1",AUTO_ID);
- n.add("Sub 2",AUTO_ID);
- n.add("Sub 3",AUTO_ID);
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement