In general, with the controls offering a list of possibilities, you must
translate the "id" of the selected item to the "label" of that id. I think
that the easiest way to do it, is to use the "from variable" option in the
control definition and to treat the returned id value as the index of that
array variable

Dim i_index as smallint, s_choices(7),choice as string
'  Define the 7 values of s_choices()
Dialog
control popupmenu title from variable s_choices into i_index
control okbutton

if commandinfo(1) then choice=s_choices(i_index) end if

Jacques Paris
-----Original Message-----
From: David Reid [mailto:[EMAIL PROTECTED]
Sent: 14-Jul-03 00:15
To: MapInfo-L
Subject: MI-L Control PopupMenu

Greetings List,

I've built a custom find dialog to search a specific street file, refined by
a specific region file.

I have the street address as an EditText box and would like to use a combo
box (Control PopUpMenu) to select the region name to refine the search by.

However, I can't get past the issue that the PopUpMenu "Into" value must be
a SmallInteger rather than the necessary Character or "String" value.


The only way I can get this to work is with EditText boxes on both accounts
and with the Dim statements:

Dim s_addr as String
Dim s_comm as String

Find s_addr, s_comm Interactive 'Interactive just incase the House number is
out of range or street name doesn't match

I would like to use a combo or PopUpMenu list to select the 's_comm' or
"Community" but that seems to require or produce only an Integer result.

Your help would be most appreciated.

Dave


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7614




---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 7621

Reply via email to