Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Expand Combobox's

Status
Not open for further replies.

Domino2006

Programmer
Jan 13, 2007
20
GB
Hi guys and gals.

Im curious is there a way of auto expanding combobox's ?
as an example if i have a combobox that is 1" wide i would like to click on it and it become 2"'s wide but i would like the control to then go back to 1" when i make a selection.

any help with could would be great.

thanx in advance

Domino2006
 
This is not you are looking for but an idea
Code:
    Private Sub ComboBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.GotFocus
        ComboBox1.Width = ComboBox1.Width * 2
    End Sub

    Private Sub ComboBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.LostFocus
        ComboBox1.Width = ComboBox1.Width / 2
    End Sub
End Class

________________________________________________________
Zameer Abdulla
Help to find Missing people
Take the first step in faith. You don't have to see the whole staircase, just take the first step.
(Dr. Martin Luther King Jr.)
 
thank you very much this will do just fine

many thanx

Domino2006
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top