Beispiel #1
0
void MvcController::ConditionallyEnableControl
    (std::string const& name
    ,wxWindow&          control
    )
{
    control.Enable(ModelReference<datum_base>(name).is_enabled());
}
void WindowTestCase::Enable()
{
    CPPUNIT_ASSERT(m_window->IsEnabled());

    m_window->Disable();

    CPPUNIT_ASSERT(!m_window->IsEnabled());

    m_window->Enable();

    CPPUNIT_ASSERT(m_window->IsEnabled());

    m_window->Enable(false);

    CPPUNIT_ASSERT(!m_window->IsEnabled());
}
	virtual ~ScopedOkButtonDisabler() throw()
	{
		if (m_apply)	m_apply	->Enable();
		if (m_ok)		m_ok	->Enable();
		if (m_cancel)	m_cancel->Enable();

		m_parent->AllowApplyActivation( true );
	}
 ~WDO_ENABLE_DISABLE()
 {
     if( m_win )
     {
         m_win->Enable();
         m_win->SetFocus(); // let's focus back on the parent window
     }
 }