From 713d1441451812a290a4285c7aa2bf1fb020ea6e Mon Sep 17 00:00:00 2001 From: Stefan Neis Date: Wed, 4 Jan 2006 22:37:54 +0000 Subject: [PATCH] Improved size handling. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/os2/gauge.h | 4 ++++ src/os2/gauge.cpp | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/include/wx/os2/gauge.h b/include/wx/os2/gauge.h index 1b308d2c43..9b8f2dca23 100644 --- a/include/wx/os2/gauge.h +++ b/include/wx/os2/gauge.h @@ -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) diff --git a/src/os2/gauge.cpp b/src/os2/gauge.cpp index 6d1486b192..972246d597 100644 --- a/src/os2/gauge.cpp +++ b/src/os2/gauge.cpp @@ -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); +} -- 2.45.2