| button - push, default or cancel button handle |
|
Returns the height a button needs for its caption, in logical pixels. The height fits the current single-line caption, the font and any icon from SetButtonIcon. Styled appearances include vertical padding above and below the text plus the border; an empty styled caption still reserves one line, unless the button shows an icon instead. Native appearance and high contrast use Windows' ideal size. The button is not resized automatically - apply the size with SetGadgetShape after changing text, font, padding or DPI: SetGadgetShape button,20,20,ButtonPreferredWidth(button),ButtonPreferredHeight(button) Check boxes and radio buttons cause a runtime error. See the complete 10_Modern_Control_Showcase.bb sample. See also: ButtonPreferredWidth, SetButtonAppearance, SetButtonPadding, SetButtonIcon, SetGadgetShape. |