|
-
May 24th, 2002, 01:14 PM
#1
Thread Starter
Fanatic Member
Combo Box CLear
I am loading values into a combo box at load of the app. I have a clear button on my form that I want to clear everything on the form (including any text in these combo boxes). The problem is that I have it so the combo boxes are the style of 2 (Drop down list). I don't want users to be able to type anything in so they can just select what is there. If I say cboIn.text = "" it will break because the text prop is read only. If I do a cboIn.clear, it will clear all fo the contents in the drop down list. I just want it to clear what is in the text prop. Any thoughts?
-
May 24th, 2002, 01:15 PM
#2
Here ya go:
Code:
Combo1.listindex=-1
-
May 24th, 2002, 01:16 PM
#3
Frenzied Member
Can't you use ComboName.ListIndex = 0? That'll select the first list item. I think that's what you mean, sorry if it isn't
-
May 24th, 2002, 01:18 PM
#4
Member
I don't know too much about combo boxes because I don't use them often, but you could make an annoying If statement, so the user cannot type what they want inside of it, then using cboln.text = "", will work. (This is if you use the style prop #1)
-
May 24th, 2002, 01:40 PM
#5
Frenzied Member
To clear the combo box
To make it so users cant type in combo box
VB Code:
Private Sub Combo1_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|