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())
{
if (parent)
::ScreenToClient((HWND) parent->GetHWND(), &point);
+ // We may be faking the client origin.
+ // So a window that's really at (0, 30) may appear
+ // (to wxWin apps) to be at (0, 0).
+ if (GetParent())
+ {
+ wxPoint pt(GetParent()->GetClientAreaOrigin());
+ point.x -= pt.x;
+ point.y -= pt.y;
+ }
*x = point.x;
*y = point.y;
}
if (y == -1 || (sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
y1 = currentY;
+ AdjustForParentClientOrigin(x1, y1, sizeFlags);
+
char buf[300];
int x_offset = x;
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 )