Solved

GroupBox Text Property

Posted on 2008-10-12
6
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 48

Expert Comment

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

Accepted Solution

by:
jpaulino earned 500 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

688 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