|
-
Sep 23rd, 2000, 07:14 PM
#1
Thread Starter
Frenzied Member
Hi,
I'm setting up a combo box on my form but I'm running into the following catch 22 situation:
I don't want the user to be able to type anything in the box so I set it to the "Dropdown List" style which seems to prevent the user from typing in text. However, with this style, it won't let me set anything for .Text. The idea is that I want the combo box to initially say "Select view..." so the user know what the heck the combo box is for...But, I can't seem to figure out how to get text to show in the combo box when the form is loaded.. The only way to do this seems to be when you set the style back to "Dropdown Combo", but again, the user is allowed to enter text, which I want to prevent..
Any help would be appreciated..
Dan
-
Sep 23rd, 2000, 07:24 PM
#2
_______
<?>
Just set the comboxbox Locked to true
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 23rd, 2000, 07:30 PM
#3
Fanatic Member
Well two possible things:
1) Keep it's style at the dropdown list and put a label above it to let them know what to do.
2) Switch it back and do the following:
Code:
Private Sub Form_Load()
Combo1.AddItem "Select View"
For i = 1 To 11
Combo1.AddItem i
Next
Combo1.ListIndex = 0
End Sub
Then add error code so that if they select it, it does nothing. However option 1 works best in my opinion.
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
-
Sep 23rd, 2000, 07:32 PM
#4
Fanatic Member
Then again, the best bet is Locking it as HeSaidJoe has stated... I didn't think of that
www.RealisticGraphics.net
Running VS.Net Enterprise & VB 6
Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML
MSN Messenger: kmsheff
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
|