Method to check WX_UNIT_BINDER value validity.

This commit is contained in:
Maciej Suminski 2015-07-09 13:35:50 +02:00
parent f7ea9f9136
commit 9c44750ae0
2 changed files with 16 additions and 2 deletions

View File

@ -73,6 +73,14 @@ int WX_UNIT_BINDER::GetValue() const
}
bool WX_UNIT_BINDER::Valid() const
{
double dummy;
return m_textCtrl->GetValue().ToDouble( &dummy );
}
void WX_UNIT_BINDER::Enable( bool aEnable )
{
m_textCtrl->Enable( aEnable );

View File

@ -60,6 +60,12 @@ public:
*/
virtual int GetValue() const;
/**
* Function Valid
* Returns true if the text control contains a real number.
*/
bool Valid() const;
/**
* Function Enable
* Enables/diasables the binded widgets