font retrieval synched for setsize and bestsize

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2004-06-25 12:19:33 +00:00
parent 6d325d81bc
commit 3413ceade8

View File

@ -483,7 +483,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
if (i&&((i%m_majorDim)==0)) // not to do for the zero button!
{
if (m_windowStyle & wxRA_VERTICAL)
if (m_windowStyle & wxRA_SPECIFY_ROWS)
{
x_offset += maxWidth + charWidth;
y_offset = y_start;
@ -512,7 +512,7 @@ wxSize wxRadioBox::DoGetBestSize() const
int eachWidth, eachHeight;
int totWidth, totHeight;
wxFont font = GetParent()->GetFont();
wxFont font = /*GetParent()->*/GetFont();
GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),
&charWidth, &charHeight, NULL, NULL, &font);