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

radBarcode forecolor changing

1 Answer 55 Views
Barcode
This is a migrated thread and some comments may be shown as answers.
Fazil
Top achievements
Rank 1
Fazil asked on 14 Sep 2018, 11:42 AM

Hello,

I am build a windows form application for barcode generation. How can I change barcode forecolor? I have button for selecting color.

click the button name is "btnforcolor" then show color dialoguebox. Then select forecolor for my radBarcode component. Please help me.

My code given below

      private void btnForeColor_Click(object sender, EventArgs e)
        {
            using (ColorDialog cdialog1 = new ColorDialog())
            {
                cdialog1.AnyColor = true;
                if (cdialog1.ShowDialog() == DialogResult.OK)
                {
                    radBarcode1.ForeColor = cdialog1.Color;
                    this.btnForeColor.BackColor = cdialog1.Color;
                }
            }
        }

 

and Page Loading

 

        private void SecondCustomControle_Load(object sender, EventArgs e)
        {
            this.btnForeColor.BackColor = radBarcode1.ForeColor;
            this.btnBackColor.BackColor = radBarcode1.BackColor;     
        }

 

but this is not working. Please Help me.Thanks In advance.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 17 Sep 2018, 10:15 AM
Hi Fazil,

Thank you for writing.

Indeed the reported behavior can be considered an issue. I have logged the item on our feedback portal, here: FIX. RadBarCode - the ForeColor property set to the control should propagate to the main element. I have also updated your Telerik points. Additionally, you can subscribe to the item and be updated when its status changes. We will try to include the fix in the service pack release scheduled for 1 month from now. Until then you will need to set to ForeColor to the main element of the control this way: 
this.radBarcode1.BarcodeElement.ForeColor = Color.Red;

I hope this will help. Let me know if you need further assistance.

Regards,
Hristo
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
Barcode
Asked by
Fazil
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or