|
-
Oct 25th, 2006, 07:41 AM
#1
Thread Starter
Lively Member
[2003] textbox click
I am trying to get the text from a multiline textbox at the point where it is clicked using Me.TextBox1.SelectionStart().
the click event of the textbox doesn't fire, should it?
I tried a panel underneath the textbox but click only fires if you click outside the textbox area.
I have considered using a listbox and SelectedIndexChanged but it doesn't scroll.
any ideas how I can get the desired effect with either a textbox or listbox?
Thanks in advance.
-
Oct 26th, 2006, 03:42 AM
#2
Fanatic Member
Re: [2003] textbox click
i think you would have to use the mouse down event or else maybe the gotfocus event.
are you trying to get the text from the start of the textbox to the point thats selected
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Oct 28th, 2006, 10:07 PM
#3
Re: [2003] textbox click
I agree with Strider in general, though I just posted a long rambling answer that might be of interest here (though JM posted a simpler solution to that question, some of the ideas I discussed might get around the panel behind the textbox issue):
http://www.vbforums.com/showthread.php?t=435203
However, to generalize what Strider stated: Find an event that fires when the mouse is clicked, and gives you the click location. If the click event doesn't work (it shouldn't, it's a mouse event you need), then try MouseDown, MouseEtc.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|