Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

GroupBox Text Property

Posted on 2008-10-12
6
Medium Priority
?
299 Views
Last Modified: 2010-04-23
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
Comment
Question by:Mr_Fulano
  • 3
  • 3
6 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 22698896
GroupBox or Combobox ?
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 2000 total points
ID: 22698906
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
 

Author Comment

by:Mr_Fulano
ID: 22699103
Big Typo...Sorry, I meant ComboBox
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:Mr_Fulano
ID: 22699114
Hi JPaulino, man you sure do know a lot of neat tricks!!!  Good answers.

Thanks,
Fulano
0
 

Author Closing Comment

by:Mr_Fulano
ID: 31505498
Good answers!!!
0
 
LVL 48

Expert Comment

by:jpaulino
ID: 22699117
>> 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question