Re: DropDownList
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 16, 2001
- 467 views
----- Original Message ----- From: "George Walters" <gwalters at sc.rr.com> To: "EUforum" <EUforum at topica.com> Subject: DropDownList > > I'm trying to figure out how to use a dropdownlist and have a question or 2. > > 1. Can you change the size of the dropdown button? It makes my input > field larger > vertically? No, the size is fixed by the Windows DLL based the font size being used. To change this is a lot of work that is probably not justified. You have to do your own drawing of the control. > 2. I would like to show a list of text in the dropdown but when an item > is selected I want to show the code for it in the text window, not the text > itself. For example "2% 10 Net 30" in the drop down, but move N3 code into > the field....Is this possible? Or do I not understand this control? Is there > another control I should use? > You could try something like this ... -------------- sequence ddKeys, ddCodes ddKeys = {"2% 10 Net 30", "3% 10 Net 60", "5% 15 Net 90" } ddCodes= { "N3" , "N6" , "N9" } procedure Init_myDropDown() eraseItems(myDropDown) addItem(myDropDown, ddKeys) end procedure procedure myDropDown_Click() sequence pick integer what pick = getItem(myDropdown, 0) if length(pick) != 0 then what = find(pick, ddKeys) if what != 0 then theField = ddCodes[what] else setText(MsgArea, "Unknown discount selected" end if else setText(MsgArea, "No discount selected") end if end procedure ----------- Derek