combo box (input capital letter)

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

In textbox, there is a property (character casing), However, in combox , any
method/property to set it (as the user input the text, it is default to
upper case ?
Thanks a lot
 
I don't see anything for a combo box. You could make an on_change method
like the following:

Sub cb1_onchange()
Dim mystring as String
mystring = cb1.Text
cb1.Text = mystring.ToUpper()
End Sub
 
your going to have to use the keypress event I think

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 
This kind-of works:
Private Sub ComboBox1_KeyUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyUp

ComboBox1.Text = ComboBox1.Text.ToUpper()

End Sub

Except that it types in reverse. If you can find a way to get the cursor at
the end of the string with every keystroke then you will have it. Does
anyone else have a suggestion about the cursor location problem?
 
Use the SelectionStart property to position the cursor. as long as
SelectionLength is 0 all you get is the cursor at the position you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top