Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*ej36_ComboBoxIcons
- Ejemplo para crear un control ComboBox con Iconos */
- #include <radc++.h>
- Form Form1("Combo Box con iconos ejemplo - RAD C++ Ejemplo");
- ComboBox combo("", AUTO_ID, 10, 15, 200, 100, Form1);//create new combo box
- FormProcedure procedure1 (FormProcArgs) {
- ON_CLOSE() Application.close();
- return 0;
- }
- IconList icl; //create new iconlist
- Icon icon1(IDI_APPLICATION), //create 3 icon objects
- icon2(IDI_EXCLAMATION),
- icon3(IDI_HAND);
- rad_main()
- //attach form procedure
- Form1.procedure = procedure1;
- //add icons to icon list
- icl.add(icon1);
- icl.add(icon2);
- icl.add(icon3);
- //attach iconlist to combobox
- combo.setIconList(icl);
- //add some enteries to combobox
- //note: 2nd argument is reserved and msut be -1
- combo.add("entrada 1",-1,0); //3rd argument is ZERO basded index of iconin list
- combo.add("entrada 2",-1,1);
- combo.add("entrada 3",-1,2);
- combo.add("entrada con icono por default"); //did nto pass last 2 arguments so first icon is selected
- combo.select(0); //select first entry
- combo.center(); //center the combo onto form
- rad_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement