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.
Unfortunately, activation email could not send to your email. Please try again.

Resizing xp menu toolbar items within code.

Thread ID:

Created:

Updated:

Platform:

Replies:

11258 Feb 29,2004 07:34 PM Mar 2,2004 02:27 PM Windows Forms 4
loading
Tags: Tools
Ronda
Asked On February 29, 2004 07:34 PM

Is there a way to resize a toolbar item in code? I am adding a image in code and the otem doesn''t resize to fit the image so I would like to manually resize it. Thanks.

Administrator [Syncfusion]
Replied On March 1, 2004 11:44 AM

Hi Ronda, Please set the BarItem''s PaintStyle property to PaintStyle.ImageAndText enumeration value. This will automatically resize the BarItem (to display both text and image) when a image is being displayed. Please try this and let me know how it goes. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Ronda
Replied On March 2, 2004 07:07 AM

I did try this. It''s still not the right size. I am adding images that are 24X24. If I use a image list the resizing occurs but I cannot use them.

Ronda
Replied On March 2, 2004 11:18 AM

Can I manually change the size of the toolbar? When is the size set? It seems to happen before the on paint event is fired. Possibly in the init?

Administrator [Syncfusion]
Replied On March 2, 2004 02:27 PM

Hi Ronda, 1. The BarItem does not expose any APIs to set its bounds. The only way to auto resize the BarItem (to display both text and image) is by BarItem''s PaintStyle property. 2. Also, the only way to set images to the BarItem is through an ImageList and specifying the ImageIndex value. 3. If you are not adding the images through a ImageList, how are you doing it ? I have attached a sample here which shows how this can be done. Please refer to the sample and let me know if this meets your requirements. If not, kindly modify it to show the problem that you are facing. We appreciate your cooperation. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;