change baclground color enabled is false

How can I change the background color of a dfNumericTextBox created dynamically when the enable attribute is set to false?

1 Reply

UN Unknown Syncfusion Team June 1, 2020 05:41 AM UTC

Hi Jose, 

Thanks for contacting Syncfusion support. 

We have checked your query “Need to change the background color of SfNumericTextBox created during run time when the Enabled property is false” and it can be achieved by using BackColor property to meet your requirement as shown in below code snippet and screenshot. Please refer the same and let us know if you have further queries. 

C#: 
private void button1_Click(object sender, EventArgs e) 
       
            SfNumericTextBox sfNumericTextBox = new SfNumericTextBox() { Enabled = false, BackColor = Color.LightGray }; 
            sfNumericTextBox.Size = new Size(120, 30); 
            tableLayoutPanel1.Controls.Add(sfNumericTextBox, 0, 1); 
       

Screenshot
 

Regards, 
Niranjan Kumar Gopalan 





Loader.
Up arrow icon