wxPoint pt(0, 0);
#if wxUSE_TOOLBAR
- if ( GetToolBar() )
+ if ( GetToolBar() && GetToolBar()->IsShown() )
{
int w, h;
GetToolBar()->GetSize(& w, & h);
wxWindowID id,
const wxString& name)
{
- wxStatusBar *statusBar = new wxStatusBar(this, id,
- wxPoint(0, 0), wxSize(100, 20),
- style, name);
+ wxStatusBar *statusBar = new wxStatusBar(this, id, style, name);
// Set the height according to the font and the border size
wxClientDC dc(statusBar);
dc.SetFont(statusBar->GetFont());
- long y;
+ wxCoord y;
dc.GetTextExtent( "X", NULL, &y );
int height = (int)( (11*y)/10 + 2*statusBar->GetBorderY());
- statusBar->SetSize( -1, -1, 100, height );
+ statusBar->SetSize( -1, -1, -1, height );
statusBar->SetFieldsCount(number);