473,322 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

ComboBox SelectionStart Enter Event Question

Hello

I've created a .NET 2.0 form and added 6 text boxes, 1 combo box and 2
button controls.

The combo box has a DropDownStyle of DropDown, so the user can still type in
the combo box.

The combo box has the follows values in it's drop down list:
"Dear Sir,"
"Dear Madam,"

I want the text between "Dear " and "," to be highlighted when the combo box
gets focus.

I've tried adding code into the ComboBox Enter event to try and force it to
select just the text between "Dear " and "," using the SelectionStart and
SelectionLength properties, but it keeps selecting all the text.

How can I just select the text between "Dear " and "," in my ComboBox?

Thank you for your help.
Jan 29 '08 #1
1 5168
Mark,

Well, could you post a complete example which details the problem? We
could make guesses as to what you are doing, but we might not be anywhere
close.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mark" <Ma**@discussions.microsoft.comwrote in message
news:BF**********************************@microsof t.com...
Hello

I've created a .NET 2.0 form and added 6 text boxes, 1 combo box and 2
button controls.

The combo box has a DropDownStyle of DropDown, so the user can still type
in
the combo box.

The combo box has the follows values in it's drop down list:
"Dear Sir,"
"Dear Madam,"

I want the text between "Dear " and "," to be highlighted when the combo
box
gets focus.

I've tried adding code into the ComboBox Enter event to try and force it
to
select just the text between "Dear " and "," using the SelectionStart and
SelectionLength properties, but it keeps selecting all the text.

How can I just select the text between "Dear " and "," in my ComboBox?

Thank you for your help.

Jan 29 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Mr. B | last post by:
Here's the situation... You've a combobox with Items already added. Say they look like this (or even lines of text): 10-00-232 10-00-256 10-01-006 10-01-213 10-02-200
0
by: Michael Shapiro~ | last post by:
For all of you who are searching for auto complete functionality in ..net combobox. I wrote this code yesterday after being unable to find something usable and workable on the internet. All...
2
by: ross kerr | last post by:
Hi all, I have a control that extends the ComboBox object. It updates the selected item based on what the user enters in the text area. In the OnLeave event of the combobox, the selected...
0
by: Segfahlt | last post by:
I have an inherited comboBox that I'm using to try to make an intellisense type box in VS 2003 .Net. It works okay in VS.Net 2002. I can get it to do most of my stuff, but it's not keeping the...
5
by: Andy | last post by:
I am having trouble using the ComboBox in my app. I am attempting to use the text from the ComboBox, to search the list box portion. However: In my "TextChanged" event: I cannot get the value...
5
by: ross kerr | last post by:
Hi All, I am extending the combobox to create a control that selects an item based on the text the user is typing into the text area of the control. I have an issue that occurs only when i...
19
by: Bernie Yaeger | last post by:
Everyone misses the point on this - what we need is a combobox autocomplete that is a dropdownlist only. When in dropdown mode, you can enter text - making that autocomplete is trivial. But when...
2
by: Kalvin | last post by:
I found some code in Google, don't remember where, for an AutoComplete combobox. Everything is great with it except for one thing. If I use the mouse to drop the list down, then start typing to...
0
by: Randy | last post by:
Hi, I have some comboboxes that are created dynamically at run time based on user actions. I found a procedure on a message board to autofill the combobox text from the dataview that the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.