Aine,

You can use the ReadControlValue(x) method to get the currently selected
item in the popup menu, where x is the control ID.  I do a similar task to
this when I need the user to select a table and then a column from the
table.  You need to use the handler routine to do the following:
1. Read the value of popupmenu 1
2. Execute the code that will produce the contents for popupmenu 2
3. Issue the Alter Control x Title From variable, where x is the ID of
popupmenu 2 and variable is the items to populate the popup menu with.

You then need to assign handlers to popup menus 2, and 3.  This could be the
same handler, or it may be something different, it all depends on how
generic the code in the handler is! If you want further clarification I can
send you the code I use to create the table and column selection popup
menus.

Hope this helps!

Regards
Colin Henderson
WFI Consulting
07887 638771

-----Original Message-----
From: Aine Deery [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 21, 2001 10:41
To: [EMAIL PROTECTED]
Subject: MI-L Conditional population of Popupmenus?




Hi there,

I have a simple dialog box containing three popupmenus. I would like the =
data to be displayed in each to be conditional on what is chosen in the =
previous popupmenu. How do I achieve this in MapBasic? Is it possible?

Using the Calling keyword I can launch a handler procedure, but within =
this, how can I access the current value of the popupmenu?. The variable =
identified by the Into clause only seems to be populated once the OK =
button is pressed which is not what I want.

Order of events:
1. popupMenu_1 is populated on intitialisation.
2. The user chooses an item from popumenu_1 which determines what =
populates popupmenu_2
3. The user chooses an item from popumenu_2 which determines what =
populates popupmenu_3
4. The user chooses an item from popumenu_3
5. The user clicks the Ok button to lauch an action.

Any ideas?

Regards,
Aine Deery




_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to