Results 1 to 5 of 5

Thread: [RESOLVED] [2005] Combobox Default Value

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2007
    Posts
    69

    Resolved [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!

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    Toronto, ON
    Posts
    1,093

    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 "".

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [2005] Combobox Default Value

    Actuall, that would be the GotFocus event. A VB combo box does not have an OnFocus event.

  4. #4
    Frenzied Member
    Join Date
    May 2006
    Location
    Toronto, ON
    Posts
    1,093

    Re: [2005] Combobox Default Value

    Quote 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?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2007
    Posts
    69

    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
  •  



Click Here to Expand Forum to Full Width