Re: DropDownList
- Posted by George Walters <gwalters at sc.rr.com> Aug 16, 2001
- 434 views
Your program snipit looks like it would work fine if the dropdownlist field width could be larger than the coded field width. Can't see how to do this.. The code in the field would be like 'n30' or 'n60' , so the editText field only should be 3-6 chars but the descriptive text for this could be much larger (usually about 15). The short code would be used in the DB and on internal reports, the long on invoices, statements, etc. ...george ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: Re: DropDownList > > > ----- Original Message ----- > From: "George Walters" <gwalters at sc.rr.com> > To: "EUforum" <EUforum at topica.com> > Sent: Friday, August 17, 2001 4:04 AM > 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 > > > > > > >