selectedtext changed event

Hi,

vb6 offered for the Textbox control the event SelectedTextChanged. How is this done in .net

Cheers,

Frank



Answer this question

selectedtext changed event

  • Osmose1000

    that part is done via the Mouse_Up event

    Cheers


  • Answer_ME

    Hi,
    I'm wrong about my statement. The vb6 textbox control doesn't have an event that fires when the user selects text in the textbox. This is a feature in the RichTextBox control.
    It would be nice for the textbox control to have the same RichTextBox1_SelectionChanged event.

    Cheers,
    Frank


  • inkisgod

    for the textbox, there is a textchanged event. Simply select the textbox in question in designer view, view its properties, select the events icon (lightning symbol) and scroll down to the "TextChanged" event, double click it to create the event

    this event will fire everytime the text has been changed in some way in the textbox

    does this help is this what you are after



  • Vaibhav_Patel

    why not use RichTextBox instead

  • PsyCadelik

    but if the user alter the selected text via mouse selection.

    May be you should also handle the mouse click event.



  • Robby-rice

    a textbox is enough. I added two eventhandlers to the code, KeyUp and MouseUp. This gives me the possibilty to check whether or not the user selected some text in the textbox.

    Cheers,


  • selectedtext changed event