Allow using a different text value in wxGTK wxSpinCtrl
Make it possible to use a string value different from the numeric value, as wxMSW version allows this and some existing code depends on it. Closes #19140.
This commit is contained in:
@@ -268,6 +268,17 @@ TEST_CASE_METHOD(SpinCtrlTestCase2, "SpinCtrl::Value", "[spinctrl]")
|
||||
// Calling SetValue() shouldn't have generated any events.
|
||||
CHECK(updatedSpin.GetCount() == 0);
|
||||
CHECK(updatedText.GetCount() == 0);
|
||||
|
||||
// Also test that setting the text value works.
|
||||
CHECK( m_spin->GetTextValue() == "100" );
|
||||
|
||||
m_spin->SetValue("57");
|
||||
CHECK( m_spin->GetTextValue() == "57" );
|
||||
CHECK( m_spin->GetValue() == 57 );
|
||||
|
||||
m_spin->SetValue("");
|
||||
CHECK( m_spin->GetTextValue() == "" );
|
||||
CHECK( m_spin->GetValue() == 57 );
|
||||
}
|
||||
|
||||
TEST_CASE_METHOD(SpinCtrlTestCase2, "SpinCtrl::Base", "[spinctrl]")
|
||||
|
Reference in New Issue
Block a user