if you do SelLength=len(YourText.Text), it will probably help to solve part
of the problem.
Elvira
-----Original Message-----
From: Lance Allen [mailto:lmallen@s...]
Sent: Wednesday, July 12, 2000 10:00 PM
To: professional vb
Subject: [pro_vb] VB's ComboBox Control
I have been banging my head against the wall all day, any help would be
appreciated. I'm using VB Professional version 6 with all service packs
installed (through Service Pack 3).
I have a form with numerous Combo's on it. The combo's are Style =
0-DropDownLists and sort is set to True. All other properties are set at
their defaults.
When a user selects from the Combo list the selected item is shown in the
text box as highlighted. But only a blue highlight is displayed and the
underlying text does not show. When the combo loses focus the proper text
is displayed in the Combo.Text area.
I experienced the same problem if the user did NOT dropdown the list but
instead chose to use the Up/Down arrow keys on the combo box, however I was
able to circumvent this problem by placing the following code in the
KeyDown and KeyUp events:
If KeyCode = vbKeyDown Or KeyCode = vbKeyUp Then
cboCharge.SelStart = 1
cboCharge.SelLength = 0
End If
Any thoughts, suggestions on how to resolve this would be greatly
appreciated.
lm allen