- AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
+
+ wxSize actualSize(size);
+ if (actualSize.x == -1)
+ actualSize.x = bitmap.GetWidth();
+ if (actualSize.y == -1)
+ actualSize.y = bitmap.GetHeight();
+ AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, actualSize.x, actualSize.y);