if ( ret.x < 80 )
ret.x = 80;
- ret.y = 16 + GetCharHeight();
+ // If this request_size is called with no entries then
+ // the returned height is wrong. Give it a reasonable
+ // default value.
+ if (ret.y <= 18)
+ ret.y = 8 + GetCharHeight();
return ret;
}
wxSize wxGauge::DoGetBestSize() const
{
- if (HasFlag(wxGA_HORIZONTAL))
- return wxSize(100, 28);
- else
+ if (HasFlag(wxGA_VERTICAL))
return wxSize(28, 100);
+ else
+ return wxSize(100, 28);
}
void wxGauge::SetRange( int range )
if ( ret.x < 80 )
ret.x = 80;
- ret.y = 16 + GetCharHeight();
+ // If this request_size is called with no entries then
+ // the returned height is wrong. Give it a reasonable
+ // default value.
+ if (ret.y <= 18)
+ ret.y = 8 + GetCharHeight();
return ret;
}
wxSize wxGauge::DoGetBestSize() const
{
- if (HasFlag(wxGA_HORIZONTAL))
- return wxSize(100, 28);
- else
+ if (HasFlag(wxGA_VERTICAL))
return wxSize(28, 100);
+ else
+ return wxSize(100, 28);
}
void wxGauge::SetRange( int range )