5 Answers, 1 is accepted
0
Hello Shafqat,
Here is how to set the icon like in the demo:
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Progress Telerik
Here is how to set the icon like in the demo:
radTextBoxControl1.TextBoxElement.Image = Image.FromFile(@
"C:\img\delete.png"
);
radTextBoxControl1.TextBoxElement.ImageAlignment = ContentAlignment.MiddleLeft;
radTextBoxControl1.TextBoxElement.ImageLayout = ImageLayout.None;
radTextBoxControl1.TextBoxElement.ViewElement.Padding =
new
System.Windows.Forms.Padding(35, 2, 2, 0);
radTextBoxControl1.TextBoxElement.Children[1].Padding =
new
System.Windows.Forms.Padding(35, 2, 2, 0);
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Shafqat
Top achievements
Rank 1
answered on 30 Nov 2017, 04:38 PM
the icon is not adjusting at left side of textbox control it's displayed as background of textbox control. i want to set an icon at left side of textbox control not as whole background image
0
Hi Shafqat,
Actually, my code is different than the code in the demo application. I am using the image property and the image will be painted on the left side.
Please do not hesitate to contact us with any additional questions or concerns.
Regards,
Dimitar
Progress Telerik
Actually, my code is different than the code in the demo application. I am using the image property and the image will be painted on the left side.
Please do not hesitate to contact us with any additional questions or concerns.
Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Mark
Top achievements
Rank 1
answered on 28 Aug 2019, 03:45 AM
I see this is an old post, but it solves an design spec. I have.
in this example, how do you set focus to the textbox, such that the cursor is in the first position of the enter-able text area?
The following places the cursor left of the image, and clearly isn't correct:
txtUserName.TextBoxElement.Focus()
0
Hello, Mark,
According to your description I suppose that you have a RadTextBoxControl and an image on its left side. If you want the cursor to be displayed after the image you should set appropriate Padding to the TextBoxViewElemet which holds the text area. Please refer to the following code snippet which result is illustrated in the attached gif file:
I hope this helps. Should you have any other questions do not hesitate to ask.
Regards,
Nadya
Progress Telerik
According to your description I suppose that you have a RadTextBoxControl and an image on its left side. If you want the cursor to be displayed after the image you should set appropriate Padding to the TextBoxViewElemet which holds the text area. Please refer to the following code snippet which result is illustrated in the attached gif file:
radTextBoxControl1.TextBoxElement.ViewElement.Padding =
new
System.Windows.Forms.Padding(20, 2, 2, 0);
I hope this helps. Should you have any other questions do not hesitate to ask.
Regards,
Nadya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.