Re: Win32Lib; Control; Dropdown; Index and data?
- Posted by don cole <doncole at pacbell.net> Mar 20, 2007
- 496 views
ZNorQ wrote: > > I've got database table content that I want to be presented in a dropdown > control. I'm not gonna put inn all the field values in the control, but I > need the unique index and the readable information. > > Example; Databasetable "TBL_PERSON" content; > ------------------------------------------- > KEY SURNAME FIRST NAME > ------------------------------------------- > 0001 Olsen Elvis > 0002 Jensen Thor > 0003 Jordan Jens > ------------------------------------------- > > I want this data to be presented in a dropdown control, with the > index hidden, and the full name shown with "SURENAME, FIRST NAME". > When the user makes a selection, it is the KEY that is returned, not > the name itself. > > Is this possible? This principle was taken from the dropdown control in > MS Access, and I was kinda hoping it would have the same function in Win32Lib. > > Regards > Kenneth / ZNorQ Hello ZNorQ, If you mean a menu drop down that should be pretty simple. Untested.
constant Menu_Item_0001=createEx(MenuItem,"0001 Olson Elvis",Menu_Main,0,0,0,0,0)
function doIt(integer s,intrgedr e,sequence p) return "0001" end function SetHandler(Menu_Item_0001,routine_id("doIt")
Don Cole }}}