Also implement wxSpinCtrl::GetTextValue() for wxGTK1

This commit is contained in:
Vadim Zeitlin
2021-04-18 13:04:47 +02:00
parent b6f8a8cf5b
commit f2d3589d88
2 changed files with 8 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ public:
void SetValue(const wxString& text);
void SetSelection(long from, long to);
virtual wxString GetTextValue() const;
virtual int GetValue() const;
virtual void SetValue( int value );
virtual void SetRange( int minVal, int maxVal );

View File

@@ -203,6 +203,13 @@ int wxSpinCtrl::GetMax() const
return (int)ceil(m_adjust->upper);
}
wxString wxSpinCtrl::GetTextValue() const
{
wxCHECK_MSG(m_widget, wxEmptyString, "invalid spin button");
return gtk_entry_get_text( GTK_ENTRY(m_widget) );
}
int wxSpinCtrl::GetValue() const
{
wxCHECK_MSG( (m_widget != NULL), 0, wxT("invalid spin button") );