Getting the correct menu

BlitzPlus Forums/BlitzPlus Beginners Area/Getting the correct menu

PaulJG(Posted 2005) [#1]
Bought myself Blitz+ :) tis a beast !.

Anyway, a little stuck on menus..

I'd got 3 menus setup, as well as 2 tabbed panels.

But I cant seem to get at what menu I've picked. I'm using this code:
	If EventID()=$1001
		EID=EventData()
		If EID=1 Then End
	EndIf

It works, but closes down every time I select the first item from any of the 3 menus.
How can I find out which menu I've currently selected from ?

It should only shutdown when the second option from the third menu is selected !.


WolRon(Posted 2005) [#2]
This is probably because you gave the first item of each of the 3 menus the same ID (ID = 1).

Give EVERY menu item a different ID.
This is the ID:   |
                  V
CreateMenu "Open",1,file


As a rule of thumb, I give all menu items in the first menu ID numbers like 10-19, items in the second menu ID's 20-29, in the third 30-39, etc. This way, you know you haven't reused any since each is part of a different group of 10.


PaulJG(Posted 2005) [#3]
That was it thankyou - and great advice !