summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
79a773b)
called any more. Added 2 lines to the controls sample to demonstrate it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1227
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
button = new wxButton( panel, ID_LISTBOX_FONT, "Set Italic font", wxPoint(340,130), wxSize(140,30) );
button->SetForegroundColour( "red" );
m_checkbox = new wxCheckBox( panel, ID_LISTBOX_ENABLE, "Disable", wxPoint(20,130), wxSize(140,30) );
button = new wxButton( panel, ID_LISTBOX_FONT, "Set Italic font", wxPoint(340,130), wxSize(140,30) );
button->SetForegroundColour( "red" );
m_checkbox = new wxCheckBox( panel, ID_LISTBOX_ENABLE, "Disable", wxPoint(20,130), wxSize(140,30) );
+ m_checkbox->SetValue(FALSE);
m_notebook->AddPage(panel, "wxList", FALSE, Image_List);
panel = new wxPanel(m_notebook);
m_notebook->AddPage(panel, "wxList", FALSE, Image_List);
panel = new wxPanel(m_notebook);
{
case ID_LISTBOX_ENABLE:
{
{
case ID_LISTBOX_ENABLE:
{
+ m_text->WriteText("Checkbox clicked.\n");
m_listbox->Enable( event.GetInt() == 0 );
break;
}
m_listbox->Enable( event.GetInt() == 0 );
break;
}
{
wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
{
wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
+ if ( state == GetValue() )
+ return;
+
+ // for compatibility with wxMSW don't send notification when the check box
+ // state is changed programmatically
m_blockFirstEvent = TRUE;
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), state );
m_blockFirstEvent = TRUE;
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), state );
{
wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
{
wxCHECK_RET( m_widget != NULL, "invalid checkbox" );
+ if ( state == GetValue() )
+ return;
+
+ // for compatibility with wxMSW don't send notification when the check box
+ // state is changed programmatically
m_blockFirstEvent = TRUE;
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), state );
m_blockFirstEvent = TRUE;
gtk_toggle_button_set_state( GTK_TOGGLE_BUTTON(m_widget), state );