Allow wxPGMultiButton to work even if primary editor control was not created in wxPGEditor::CreateControls(); Clarified related samples and documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-03-09 18:32:43 +00:00
parent 0b108d1006
commit 6086bcc8ba
4 changed files with 24 additions and 19 deletions

View File

@@ -134,21 +134,21 @@ bool wxSampleMultiButtonEditor::OnEvent( wxPropertyGrid* propGrid,
if ( event.GetId() == buttons->GetButtonId(0) )
{
// Do something when first button is pressed
// Do something when the first button is pressed
wxLogDebug("First button pressed");
return true;
return false; // Return false since value did not change
}
if ( event.GetId() == buttons->GetButtonId(1) )
{
// Do something when second button is pressed
wxLogDebug("Second button pressed");
return true;
// Do something when the second button is pressed
wxMessageBox("Second button pressed");
return false; // Return false since value did not change
}
if ( event.GetId() == buttons->GetButtonId(2) )
{
// Do something when third button is pressed
wxLogDebug("Third button pressed");
return true;
// Do something when the third button is pressed
wxMessageBox("Third button pressed");
return false; // Return false since value did not change
}
}
return wxPGTextCtrlEditor::OnEvent(propGrid, property, ctrl, event);