- int wChar, hChar;
- wxGetCharSize(GetHWND(), &wChar, &hChar, &GetFont());
+ // the button height is proportional to the height of the font used
+ hBtn = BUTTON_HEIGHT_FROM_CHAR_HEIGHT(hChar);
+ hBtn += hChar*(tokens.CountTokens()-1);
+
+ while (tokens.HasMoreTokens())
+ {
+ wxString sub = tokens.GetNextToken();
+ int w;
+ GetTextExtent( sub, &w, NULL);
+ if (w > wBtn)
+ wBtn = w;
+ }
+ }
+ else
+ {
+ GetTextExtent( label, &wBtn, NULL);