PDA

View Full Version : comboBox help


leex
02-10-2009, 02:31 PM
Can you help me? I have a combobox to open maps, I know how to put the names in the ComboBox, but I do not know how to link to the maps that are in Dialog.
I want to select the name and click on it then shows the dialog or page.
If anyone can help I appreciate!
I know it is something simple but I am not getting.:rolleyes

drgfx
02-10-2009, 03:42 PM
Not sure exactly what you mean,
If you post your project, I could possibly help more...

data = ComboBox.GetText("mappick");
result = Dialog.Message("Notice", "you picked" ..data.., MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

leex
02-10-2009, 08:47 PM
I did a sketch of the project, I wanted the options of the combobox to be the link to draw maps, they tivassem the same function as the buttons, quite simple.

drgfx
02-11-2009, 12:20 AM
I just looked through your project and re-read your posts,
..i'm still not exactly sure what you're trying to do, maybe I'm just really tired :(

What information do you want from the combobox?
What is the purpose of the buttons in relation to the combobox?
What information is needed in the show dialog pages?

leex
02-11-2009, 02:20 PM
The buttons are there as an example, they are not part of the project.
What I want is to select the Map1 in the combobox, the Map1 appear (Dialog1);
Map2 selecting in the combobox show the Dialog2, and so on.
I put this way to facilitate, but the entire project has more than 80 maps, I was putting everyone on the screen would be much, so I use the combobox.

exemple:
Steps:

- Select the map on the combobox, ex. Map1
- Opens the onscreen Dialog1

- Select another map in the combobox, ex Map3
- Are the dialog3 on screen

This is the same example of the project, without the buttons.
When it opens select Map1 all dialog.:huh
map1 - dialog1
map2 - dialog2
map3 - dialog3

Excuse my English I'm using an online translator! I am Brazilian!

holtgrewe
02-11-2009, 02:46 PM
As long as you keep your DialogEX events numbering the same as the Combobox index you can use somethng like this:

ComboBox On Select
x=e_Selection
DialogEx.Show("Dialog"..x, true)

otherwise the coding could get a little messy with a lot of (if) statements.

I hope that is what you need?

leex
02-11-2009, 06:59 PM
Thank you that was exactly what I wanted, I tried and worked very well.
I created another combobox named photos, and used the same code, changed the names of dialog for photo and had a sequence, worked perfect, thank you Holtgrewe and Drgfx, you helped me a lot. Thank you.:yes

azmanar
02-12-2009, 06:26 AM
Hi,

Attached APZ shows another way of making your App.

A bit more code but more custom control.

leex
02-12-2009, 10:42 AM
Thanks, Azmanar, very good too.:yes