• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 317
  • Last Modified:

GroupBox Text Property

Hi I'm using VB 2005, WinForms. I have a GroupBox on my Form and I've set the GroupBox's "DropDownStyle" property to "DropDownList". This prevents any users from entering  anything into my GroupBox that is not part of the Items collection. That works OK, but I cannot set the GroupBox.Text property to anything as a default.

I wanted to change the  GroupBox.Text property to "Please select one...", but VB does not allow me to do that.

Is there any way to set a default value or blank out the visible value, so that the user has to make a choice as to which item they want to select?

Thanks,
Fulano
0
Mr_Fulano
Asked:
Mr_Fulano
  • 3
  • 3
1 Solution
 
jpaulinoCommented:
GroupBox or Combobox ?
0
 
jpaulinoCommented:
I assume it was a typo.
You can do this:

        ' Set as empty
        Me.ComboBox1.SelectedIndex = -1
 
        ' Add a new item to the top of the collection
        Me.ComboBox1.Items.Insert(0, "Please select one ...")

Open in new window

0
 
Mr_FulanoAuthor Commented:
Big Typo...Sorry, I meant ComboBox
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Mr_FulanoAuthor Commented:
Hi JPaulino, man you sure do know a lot of neat tricks!!!  Good answers.

Thanks,
Fulano
0
 
Mr_FulanoAuthor Commented:
Good answers!!!
0
 
jpaulinoCommented:
>> Hi JPaulino, man you sure do know a lot of neat tricks!!!
:)
Glad I could help and thanks for the grade
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now