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

radtextbox

3 Answers 119 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
appdev
Top achievements
Rank 1
appdev asked on 10 Feb 2009, 10:57 PM
why can't i do select all? it just wouldn't select all the text in side that text box on the click command could some one help?

 

Private Sub txtUserName_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtUserName.Click

 

 

    txtusername.selectall()
End
Sub


 

3 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 11 Feb 2009, 04:52 PM
Hello Duy,

Thank you for your question. Our textbox control hosts a standard textbox control. To subscribe for the click event of the hosted textbox you need to work with this element:

Me.RadTextBox1.TextBoxElement.TextBoxItem.HostedControl


Then you have to cast it to TextBox and then subscribe to its Click event. Do not hesitate to write me back if you have further questions.

Greetings,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
appdev
Top achievements
Rank 1
answered on 11 Feb 2009, 05:22 PM
can you show me the code i'm still not sure what to do from there. and why is this has to be complicated? why can't we just say
bayval e as telerik....... in the sub header.
0
Nick
Telerik team
answered on 13 Feb 2009, 04:02 PM
Hi Duy,

I have written the code in VB for you:

private Sub Form1_Load(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.Load 
        AddHandler (DirectCast(Me.RadTextBox1.TextBoxElement.TextBoxItem.HostedControl, System.Windows.Forms.TextBox)).Click, AddressOf textbox_Click 
End Sub 
Private Sub textbox_Click(ByVal sender As System.ObjectByVal e As System.EventArgs) 
 
End Sub 

We are going to include a new help topic about this event. Do not hesitate to write me back if you have further questions.

Regards,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TextBox
Asked by
appdev
Top achievements
Rank 1
Answers by
Nick
Telerik team
appdev
Top achievements
Rank 1
Share this question
or