// font
ChangeFont(false);
- wxSize best = GetBestSize();
- if( size.x != -1 ) best.x = size.x;
- if( size.y != -1 ) best.y = size.y;
-
AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
- pos.x, pos.y, best.x, best.y);
+ pos.x, pos.y, size.x, size.y);
ChangeBackgroundColour();
wxSize wxTextCtrl::DoGetBestSize() const
{
if( IsSingleLine() )
- return wxDoGetSingleTextCtrlBestSize( (Widget)m_mainWidget, this );
+ {
+ wxSize best = wxControl::DoGetBestSize();
+
+ if( best.x < 110 ) best.x = 110;
+
+ return best;
+ }
else
return wxWindow::DoGetBestSize();
}
g_captureWindow = NULL;
m_isBeingDeleted = true;
-
+
// Motif-specific actions first
WXWidget wMain = GetMainWidget();
if ( wMain )
}
else
{
+ if( xx < 0 ) xx = 0;
+ if( yy < 0 ) yy = 0;
if( w < 1 ) w = 1;
if( h < 1 ) h = 1;
XtFree ((char *) ptr);
}
- if (x == -1)
- x = 0;
- if (y == -1)
- y = 0;
- SetSize (x, y, width, height);
+ SetInitialBestSize(wxSize(width, height));
+
+ if (x != -1 || y != -1)
+ {
+ if (x == -1)
+ x = 0;
+ if (y == -1)
+ y = 0;
+ Move(x, y);
+ }
- return TRUE;
+ return true;
}
// Remove event handler, remove from hash table