Solved

combobox selection

Posted on 2004-09-16
6
296 Views
Last Modified: 2008-03-06
im assuming this is a really easy question, but when my form loads, i have multiple comboboxs' that appear to be selected. (The text within them that is).....and i cant figure out how to unselect them

thanks!
0
Comment
Question by:bramsquad
  • 3
  • 2
6 Comments
 
LVL 10

Expert Comment

by:Clif
ID: 12075846
Combobox1.SelectedIndex = -1
0
 
LVL 8

Author Comment

by:bramsquad
ID: 12075911
let me rephrase,

i want the item selected, just not the text...

~b
0
 
LVL 19

Accepted Solution

by:
Desp earned 50 total points
ID: 12075939
Combobox1.SelectionStart = 0
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 8

Author Comment

by:bramsquad
ID: 12106201
Desp:

sortof, but ill give you some since you put me on the right track

heres what you want

Combobox1.SelectionStart = Combobox1.Text.Length

~b
0
 
LVL 19

Expert Comment

by:Desp
ID: 12109273
>>>i want the item selected, just not the text...

what does that mean then?

btw thanks for the C grade, Most of the peoples here dont like to answer the questions of ppls who have Cs and Bs in their question history
0
 
LVL 8

Author Comment

by:bramsquad
ID: 12118361
i use "c" grades sparingly, take a look at my profile.

anyways, the first answer gave no selection in the combo box.  (it was blank, no item at all)

your answer gave me the item i wanted, but the text within the combobox was selected (which is what i was asking how not to do)

the reason your code doesnt work, is it selects the text as position zero.  mine selects the text at the last position, or so to speak, leaves it unselected.  

you didnt provide me with a thourough answer, thats why i gave you a "c"

~b

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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