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

Change NullText Color

4 Answers 189 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
Ole
Top achievements
Rank 1
Ole asked on 10 Sep 2013, 07:05 PM
Is it possible to change the color of the NullText for a RadTextBox control?  For example, I'd like to have the NullText show as red and then if text is entered, show that as black.

Thanks,
Ole

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 13 Sep 2013, 01:00 PM
Hello Ole,

Thank you for contacting us.

In order to achieve your goal, you may have a look at the following code snippet:
public Form1()
{
    InitializeComponent();
 
    this.radTextBox1.NullText = "Enter First name";
    this.radTextBox1.TextBoxElement.TextBoxItem.NullTextColor = Color.Red;
    this.radTextBox1.TextBoxElement.TextBoxItem.ForeColor = Color.Purple;
}

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ole
Top achievements
Rank 1
answered on 13 Sep 2013, 01:47 PM
This is exactly what I was looking for.

Thank you!
0
Danny
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 12 Aug 2019, 04:35 PM
Hello How would you do it, if you change the border to red, and then return it to normal (RadTextBox.TextBoxElement.Border.ForeColor), regardless of the subject you are in, in my case I am in the Crystal theme, change the color of the border to red becomes super simple, but returning it to normal as the theme applies is complicated, some guide please. note: use vb.net
0
Nadya | Tech Support Engineer
Telerik team
answered on 13 Aug 2019, 11:47 AM
Hello, Danny,

Your question has already been answered in the other thread you have opened on the same topic. Please, see our answer there for more information.

We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding. 

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.
Tags
TextBox
Asked by
Ole
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Ole
Top achievements
Rank 1
Danny
Top achievements
Rank 1
Iron
Veteran
Iron
Nadya | Tech Support Engineer
Telerik team
Share this question
or