Results 1 to 3 of 3

Thread: [2003] textbox click

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    77

    [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.

  2. #2
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    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

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    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
  •  



Click Here to Expand Forum to Full Width