We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Changing a button icon

Hi,

We're trying to evaluate how long Essential Tools takes to change the image on a toolbar button, as we have a number of status indicators that change depending on network activity, for example.

I've added some code to one of the sample projects to change a button's image index and back again, but the display doesn't update unless I refresh the whole form, which takes a long time.

Is there a way to refresh just the button that has changed?

Many thanks

Nick

1 Reply

MU Murugan Syncfusion Team December 18, 2006 07:40 PM UTC

Hi Nick,

We will assign new Icon for a particular toolbar button by changing barItem.ImageIndex property of the barItem.

Here is the code snippet:
private void barItem1_Click(object sender, EventArgs e)
{
this.barItem2.ImageList = this.imageList1;
this.barItem2.ImageIndex = 1;
}

Please use the above code snippet and let me know if it resolves the issue.

Thanks for choosing Syncfusion products.

Regards,
Murugan P.S

Loader.
Live Chat Icon For mobile
Up arrow icon