Combobox Dropdown Type

shamas21

Registered User.
Local time
Today, 19:37
Joined
May 27, 2008
Messages
162
Hi All

There are two ways to use a drop down box typically and i want to know how to do point 2

1) The first behaviour is if you click the arrow button, then it displays the values in the combobox to choose from which allows you to edit the content of the combobox, therefor it is not restricting the user to click inside the combo box

2) where ever you click on the combox, it will never allow the cursor to enter inside the combobox, but instead it displays all the values as the drop down list appears in the combobox as if to say you clicked the arow button

- So i dont want the user to be able to put the cursor inside the combobox, instead when the user clicks anywhere on the combo box then with will diplay the values as a dropdown?

Thanks
 
I think what you want to do is, set the Combo's Limit To List Property to Yes you will find this on the Data tab of the combo's property box.
 
I think what you want to do is, set the Combo's Limit To List Property to Yes you will find this on the Data tab of the combo's property box.


Thanks for this John

This not really what i wanted, but i what i really wanted to know was how to change the behaviour of the combobox, so where ever the user clicks on the combobox (whether its on the arrow, or the inside section, or the border, or whatever) then the drop down list will appear.

The way it normally work, is the drop down appears only when the user clicks on the arrow also allowing the user to click insideb the combobox, but i want the drop down list to appear if the user clicks anywhere on the combobox and not allowing the user to click inside the combobox.

Thanks
 
1) The first behaviour is if you click the arrow button, then it displays the values in the combobox to choose from which allows you to edit the content of the combobox, therefor it is not restricting the user to click inside the combo box
Use the dropdown method in any procedure, for example,, if you wan to dropdown the list on mouse moves on the Combo,,,
Code:
Private Sub Combo1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Combo1.DropDown
End Sub
use the X and Y coordinates in a click command to decide whethe the user cliked inside,,
But regarding the second point. use the Cancel or Exit sub.. i am tryin the code
have a nice day
 
And try this too,, i trid and it worked,, please not.. the dropdown wont work if the cursor is not in the combo..i.e the combo has the current focus,,,
Set the Locked Properity of the combo to yes and the Enabled to yes..
thus the cursor can be put in the combo but editing is not alloed.. use this along with the mouse move thing,,,
good luck
 
And try this too,, i trid and it worked,, please not.. the dropdown wont work if the cursor is not in the combo..i.e the combo has the current focus,,,
Set the Locked Properity of the combo to yes and the Enabled to yes..
thus the cursor can be put in the combo but editing is not alloed.. use this along with the mouse move thing,,,
good luck

Thank you very much
 
that's good too.. but he wants the user be not able to click.. cos focus can be taken by click or move tabe. so you cn set the tabe stop peop to False
 

Users who are viewing this thread

Back
Top Bottom