I have a subclass of a CommandButton which has a completely custom draw method. The button I am trying to create displays an image next to the label and has a completely different border than the default CommandButton. The problem that I am currently having is that the default bounds set by the CommandButton class are not compatible with the way I want to layout and paint my custom button. I would like the bounds to be wider, and slightly shorter.
If I specifically set the height and width options in the constructor, I am able to get things to work. However, this causes problems if the code using my button tries to later override these options. My question is how and where is the original CommandButton class calculating its ascent, descent, lextent, rextent, etc. The values are all based on the current font size and the value of the label text. I know how to calculate the values given a text string and font size. My questions is where is CommandButton doing this and what method(s) should I be overriding to cause my button to integrate smoothly? I tried looking at the constrain-height, get-elastic-bounds-into, and get-height-preference methods, but none of them seem to be getting called. The set-size method is called once the bounds have been computed? I have thought of a few ways to make the button work, in that it will display correctly, but I would really like to do it the "right" way. Thanks in advance. Leif ******************************************* To unsubscribe from this list, send a mail to: mailto:[EMAIL PROTECTED] To contact a human list administrator, send a mail to: mailto:[EMAIL PROTECTED] To recieve a list of other options for this list, send a mail to: mailto:[EMAIL PROTECTED]