SetValidator(validator);
if (parent) parent->AddChild(this);
- SetBackgroundColour(parent->GetDefaultBackgroundColour()) ;
- SetForegroundColour(parent->GetDefaultForegroundColour()) ;
+ SetBackgroundColour(parent->GetBackgroundColour()) ;
+ SetForegroundColour(parent->GetForegroundColour()) ;
m_staticValue = 0;
m_staticMin = 0;
SubclassWin(GetHWND());
+ SetWindowText((HWND) m_hWnd, "");
+
+ SetFont(* parent->GetFont());
+
if ( m_windowStyle & wxSL_LABELS )
{
// Finally, create max value static item
0, 0, 0, 0, (HWND) parent->GetHWND(), (HMENU)NewControlId(),
wxGetInstance(), NULL);
- SetFont(parent->GetFont());
if (GetFont())
{
else
{
// No labels
+ // If we're prepared to use the existing size, then...
+ if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO))
+ {
+ GetSize(&w1, &h1);
+ }
if ( w1 < 0 )
w1 = 200;
if ( h1 < 0 )
else
{
// No labels
+ // If we're prepared to use the existing size, then...
+ if (width == -1 && height == -1 && ((sizeFlags & wxSIZE_AUTO) != wxSIZE_AUTO))
+ {
+ GetSize(&w1, &h1);
+ }
if ( w1 < 0 )
w1 = 20;
if ( h1 < 0 )