Give wxGauge a best size
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -98,6 +98,8 @@ protected:
|
||||
// set the gauge value to the value of m_gaugePos
|
||||
void DoSetGauge();
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
};
|
||||
|
@@ -98,6 +98,8 @@ protected:
|
||||
// set the gauge value to the value of m_gaugePos
|
||||
void DoSetGauge();
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGauge)
|
||||
};
|
||||
|
@@ -56,6 +56,7 @@ bool wxGauge::Create( wxWindow *parent,
|
||||
m_parent->DoAddChild( this );
|
||||
|
||||
PostCreation();
|
||||
SetBestSize(size);
|
||||
|
||||
Show( TRUE );
|
||||
|
||||
@@ -71,6 +72,11 @@ void wxGauge::DoSetGauge()
|
||||
m_rangeMax ? ((float)m_gaugePos)/m_rangeMax : 0.);
|
||||
}
|
||||
|
||||
wxSize wxGauge::DoGetBestSize() const
|
||||
{
|
||||
return wxSize(100, 28);
|
||||
}
|
||||
|
||||
void wxGauge::SetRange( int range )
|
||||
{
|
||||
m_rangeMax = range;
|
||||
|
@@ -56,6 +56,7 @@ bool wxGauge::Create( wxWindow *parent,
|
||||
m_parent->DoAddChild( this );
|
||||
|
||||
PostCreation();
|
||||
SetBestSize(size);
|
||||
|
||||
Show( TRUE );
|
||||
|
||||
@@ -71,6 +72,11 @@ void wxGauge::DoSetGauge()
|
||||
m_rangeMax ? ((float)m_gaugePos)/m_rangeMax : 0.);
|
||||
}
|
||||
|
||||
wxSize wxGauge::DoGetBestSize() const
|
||||
{
|
||||
return wxSize(100, 28);
|
||||
}
|
||||
|
||||
void wxGauge::SetRange( int range )
|
||||
{
|
||||
m_rangeMax = range;
|
||||
|
Reference in New Issue
Block a user