DropDownButton bounds adjustment

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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.