|
-
Jan 23rd, 2008, 02:11 PM
#1
Thread Starter
Lively Member
[RESOLVED] [2005] Combobox Default Value
I've got a combobox where the user can either pick a value from the control or type in a NEW value and have the new value saved.
What I'm looking for is a way to have "Type in New Value" displayed in the Text portion of the combobox BUT not have it as part of the control selections. Sorta like Microsoft did with Vista where a textbox may display "Password" and then when you place the cursor in the box the "Password" text disappears.
Any one have any suggestions?
Thanks!
-
Jan 23rd, 2008, 02:15 PM
#2
Re: [2005] Combobox Default Value
Load it up with "Type in New Value" in the Text property and then on the OnFocus event, check to see if that's the text and, if so, set the text to "".
-
Jan 23rd, 2008, 02:27 PM
#3
Re: [2005] Combobox Default Value
Actuall, that would be the GotFocus event. A VB combo box does not have an OnFocus event.
-
Jan 23rd, 2008, 03:07 PM
#4
Re: [2005] Combobox Default Value
 Originally Posted by Hack
Actuall, that would be the GotFocus event. A VB combo box does not have an OnFocus event. 
But is it really that difficult to create custom events that do the same thing as already existing events but are named slightly differently?
-
Jan 23rd, 2008, 03:15 PM
#5
Thread Starter
Lively Member
Re: [2005] Combobox Default Value
Thanks Tom!
Your solution worked perfectly!
I didn't know about the text property of the combo box but will be using it alot now.
-Ed
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
|