This is a migrated thread and some comments may be shown as answers.

Text Box Double Click Event

4 Answers 409 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
meraj
Top achievements
Rank 1
meraj asked on 25 Jan 2011, 02:07 PM
Hi,
I am using textbox and in its double click event i am doing something,
but when i click in side the box area double click event is not working,But when i click on border of textbox double click event is
working properly.
                  Is there any way  to fire double click event when i double click on the text area i.e. in side the text box.
                                                                         

4 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 25 Jan 2011, 02:13 PM
Hello Meraj,

You can use the following code to add a double click handler to the RadTextBox

AddHandler Me.RadTextBox1.TextBoxElement.TextBoxItem.DoubleClick, AddressOf RadTextBox1_DoubleClick
  
    Private Sub RadTextBox1_DoubleClick(ByVal sender As Object, ByVal e As EventArgs)
        MessageBox.Show(sender.ToString())
    End Sub

Hope that helps
Richard
0
meraj
Top achievements
Rank 1
answered on 25 Jan 2011, 02:33 PM
A lot of thanks.. Its working fine....
0
haguila
Top achievements
Rank 2
answered on 03 Dec 2014, 06:27 PM
Sorry but I've the same problem and this solution is not working for me.
When I try to add the handler as shown above, an error occurs because of TextBoxItem is unknown as member of RadTextBoxControlElement.
I've also enabled the event at TextBoxElement level (Me.txbTextoAutenticar.TextBoxElement.DoubleClickEnabled = True) but the event is not fired anyway.

Thanks in advance;
Claudio
0
Stefan
Telerik team
answered on 04 Dec 2014, 10:00 AM
Hi Claudio,

RadTextBox and RadTextBoxControl are different controls, and for the latter you can access the event directly from the control:
radTextBoxControl1.DoubleClick += radTextBoxControl1_DoubleClick;

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TextBox
Asked by
meraj
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
meraj
Top achievements
Rank 1
haguila
Top achievements
Rank 2
Stefan
Telerik team
Share this question
or