]> git.saurik.com Git - wxWidgets.git/commitdiff
Improved size handling.
authorStefan Neis <Stefan.Neis@t-online.de>
Wed, 4 Jan 2006 22:37:54 +0000 (22:37 +0000)
committerStefan Neis <Stefan.Neis@t-online.de>
Wed, 4 Jan 2006 22:37:54 +0000 (22:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/os2/gauge.h
src/os2/gauge.cpp

index 1b308d2c434e3045e23751cc09e32a1281b3bc10..9b8f2dca23347300afeb271d78a24129bab03aaa 100644 (file)
@@ -68,6 +68,10 @@ public:
 protected:
     int                             m_nRangeMax;
     int                             m_nGaugePos;
+    int                             m_nWidth;
+    int                             m_nHeight;
+
+    wxSize wxGauge::DoGetBestSize(void) const;
 
 private:
     DECLARE_DYNAMIC_CLASS(wxGauge)
index 6d1486b192dc6228516c60b922f0d9561cf1a686..972246d597264d076c98d27c67d3de6cd30ab49f 100644 (file)
@@ -214,6 +214,8 @@ bool wxGauge::Create(
             ,nWidth
             ,nHeight
            );
+    m_nWidth  = nWidth;     // Save for GetBestSize
+    m_nHeight = nHeight;
     ::WinShowWindow((HWND)GetHWND(), TRUE);
     delete pTextFont;
     return TRUE;
@@ -304,4 +306,7 @@ void wxGauge::SetValue(
     ::WinInvalidateRect(GetHwnd(), &vRect, FALSE);
 } // end of wxGauge::SetValue
 
-
+wxSize wxGauge::DoGetBestSize() const
+{
+    return wxSize(m_nWidth,m_nHeight);
+}