473,383 Members | 1,846 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,383 software developers and data experts.

Problem with ToolStripTextBox

I just want to select the complete text when someone enters the textbox
(mouse click etc.). When I am executing within the IDE (VS 2005 Pro) no
problem.

Execute outside the IDE and no select takes place.
Code:

Private Sub tbSearchTxt_Enter(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tbSearchTxt.Enter
' select all text to make paste of new info easier
tbSearchTxt.SelectAll()
End Sub

Any ideas or is that control broken?

Lloyd Sheen

Nov 17 '07 #1
4 2104

"Lloyd Sheen" <a@b.cwrote in message
news:ei**************@TK2MSFTNGP02.phx.gbl...
>I just want to select the complete text when someone enters the textbox
(mouse click etc.). When I am executing within the IDE (VS 2005 Pro) no
problem.

Execute outside the IDE and no select takes place.
Code:

Private Sub tbSearchTxt_Enter(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tbSearchTxt.Enter
' select all text to make paste of new info easier
tbSearchTxt.SelectAll()
End Sub

Any ideas or is that control broken?

Lloyd Sheen
More info. It seems the only reason it worked in IDE is the breakpoint. No
breakpoint no code execution it seems. Now I put a msgbox in the handler
code and it works both in IDE and as executable outside the IDE. Some
pretty weird stuff going on here.

LS

Nov 18 '07 #2
It is not just the ToolStripTextBox, all text boxes work this way. Why not
just put your selectall in the click event?
--
Terry
"Lloyd Sheen" wrote:
>
"Lloyd Sheen" <a@b.cwrote in message
news:ei**************@TK2MSFTNGP02.phx.gbl...
I just want to select the complete text when someone enters the textbox
(mouse click etc.). When I am executing within the IDE (VS 2005 Pro) no
problem.

Execute outside the IDE and no select takes place.
Code:

Private Sub tbSearchTxt_Enter(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tbSearchTxt.Enter
' select all text to make paste of new info easier
tbSearchTxt.SelectAll()
End Sub

Any ideas or is that control broken?

Lloyd Sheen

More info. It seems the only reason it worked in IDE is the breakpoint. No
breakpoint no code execution it seems. Now I put a msgbox in the handler
code and it works both in IDE and as executable outside the IDE. Some
pretty weird stuff going on here.

LS

Nov 18 '07 #3

"Terry" <Te****@nospam.nospamwrote in message
news:69**********************************@microsof t.com...
It is not just the ToolStripTextBox, all text boxes work this way. Why
not
just put your selectall in the click event?
--
Terry
"Lloyd Sheen" wrote:
>>
"Lloyd Sheen" <a@b.cwrote in message
news:ei**************@TK2MSFTNGP02.phx.gbl...
>I just want to select the complete text when someone enters the textbox
(mouse click etc.). When I am executing within the IDE (VS 2005 Pro) no
problem.

Execute outside the IDE and no select takes place.
Code:

Private Sub tbSearchTxt_Enter(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tbSearchTxt.Enter
' select all text to make paste of new info easier
tbSearchTxt.SelectAll()
End Sub

Any ideas or is that control broken?

Lloyd Sheen

More info. It seems the only reason it worked in IDE is the breakpoint.
No
breakpoint no code execution it seems. Now I put a msgbox in the handler
code and it works both in IDE and as executable outside the IDE. Some
pretty weird stuff going on here.

LS

Thanks, did that and works like a charm. Wonder why clicking is not seen as
entering..

Oh well

LS

Nov 18 '07 #4
Here is my guess... clicking does the enter but then starts a new 'select'
ending with the mouse up event. If you do other things like change the
background and font colors in the 'enter' event, it works fine. So my guess
is that the the text is getting selected in the enter and then deselected by
the mouse events.
--
Terry
"Lloyd Sheen" wrote:
>
"Terry" <Te****@nospam.nospamwrote in message
news:69**********************************@microsof t.com...
It is not just the ToolStripTextBox, all text boxes work this way. Why
not
just put your selectall in the click event?
--
Terry
"Lloyd Sheen" wrote:
>
"Lloyd Sheen" <a@b.cwrote in message
news:ei**************@TK2MSFTNGP02.phx.gbl...
I just want to select the complete text when someone enters the textbox
(mouse click etc.). When I am executing within the IDE (VS 2005 Pro) no
problem.

Execute outside the IDE and no select takes place.
Code:

Private Sub tbSearchTxt_Enter(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles tbSearchTxt.Enter
' select all text to make paste of new info easier
tbSearchTxt.SelectAll()
End Sub

Any ideas or is that control broken?

Lloyd Sheen

More info. It seems the only reason it worked in IDE is the breakpoint.
No
breakpoint no code execution it seems. Now I put a msgbox in the handler
code and it works both in IDE and as executable outside the IDE. Some
pretty weird stuff going on here.

LS


Thanks, did that and works like a charm. Wonder why clicking is not seen as
entering..

Oh well

LS

Nov 18 '07 #5

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

Similar topics

117
by: Peter Olcott | last post by:
www.halting-problem.com
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
4
by: Brian Keating | last post by:
hi there, does anyone know how to prevent the context menu on a ToolStripText box from appearing? when i right click on the toolstriptextbox i get presented with the system undo ------ cut...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
3
by: osmarjunior | last post by:
I cannot set focus on a ToolStripTextBox of my tool bar. I've tried the following: myToolBar.Select(); myTextBox.Focus(); The edit cursor doesn't appear on the text box... strange!!!... ...
0
by: Gianmaria Iaculo - NVENTA | last post by:
Hi, i need a custom toolstriptextbox... something that is similar to the standard one but witha button on the right. I want to bypass the user "ENTER" and let him press a button with something...
0
by: mcurros | last post by:
Too late but it may be of some help to others... me.ActiveControl=me.ToolStripTextBox.Control Cheers! Mariano
2
by: Lloyd Sheen | last post by:
I am just trying to get the event when a user clicks into the ToolStripTextBox to allow me to select all the text. I got an answer to handle the click event as an enter. Well if I do that then I...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.