DropDownButton bounds adjustment

Hi
I have a customized combo derived from ComboDropDown which has a customized button derived from DropDownButton.
I override the OnPaint to draw a bitmap on the button.
g.DrawImage(theButtonImage, new Point(this.Bounds.X, this.Bounds.Y));

I have a small problem . I dont understand where the BOunds of the Button is determined. There seems to be a fixed bounds that cannot be modified. I tried adjusting the bounds to the bounds of the image , in the onPaint but the next time on paint is called I see the bounds returned to the original size.
Can anyone tell me how I can adjust the bounds of the button to the real bounds of the image

Thanks


1 Reply

PJ Poly J Syncfusion Team April 3, 2007 07:14 AM UTC

Hi Ryan,

Thanks for your interest in Syncfusion products.

You can set the bounds for the dropdown button by overriding the UpdateDropDownButtonBounds method of combodropdown Class. Please refer to the attached sample in the following location and let me know if this is helpful for you.

http://websamples.syncfusion.com/samples/Tools.Windows/F58738/main.htm

Best Regards,
Poly


Loader.
Up arrow icon