WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Dialog Editor version 6.X
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Disable Entry into a DropListBox

Keywords: 	 disable entry disable user input into DropListBox

Question:

How can I disable entry into the Editbox portion of a DropListBox?

Answer:

When you create the DropListBox in the Dialog Editor, right click on the DropListBox control, select the Style tab, and then select, "List Only". This will change the fourth to last parameter in the DropListBox to a "4", e.g.,
xxx="apples bananas pears"
xxx=StrReplace(xxx," ",@TAB)

MyDialogFormat=`WWWDLGED,6.1`

MyDialogCaption=`WIL Dialog 1`
MyDialogX=015
MyDialogY=062
MyDialogWidth=076
MyDialogHeight=080
MyDialogNumControls=002
MyDialogProcedure=`DEFAULT`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0

MyDialog001=`018,055,034,011,PUSHBUTTON,DEFAULT,"OK",1,1,32,DEFAULT,DEFAULT,DEFAULT`
MyDialog002=`001,010,063,100,DROPLISTBOX,xxx,"pears",DEFAULT,3,4,DEFAULT,DEFAULT,DEFAULT`  ;<= set 10th parameter to "4"

ButtonPushed=Dialog("MyDialog")

Message("Selection",xxx)
exit

Article ID:   W15464
File Created: 2003:05:13:11:28:06
Last Updated: 2003:05:13:11:28:06