Moved wxPGChoices m_choices member from various property classes to base wxPGProperty. This allows any property to have choices without subclassing and therefore work with Choice and ComboBox editors. Also removed redundant choice manipulation functions from wxPropertyGridinterface (ie. now use ones in wxPGProperty).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-09-19 16:57:33 +00:00
parent 57306cd4fd
commit 939d936402
15 changed files with 643 additions and 934 deletions

View File

@@ -1023,6 +1023,24 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
}
}
{
RT_START_TEST(Choice_Manipulation)
wxPGProperty* enumProp = pgman->GetProperty(wxT("EnumProperty"));
pgman->SelectPage(2);
pgman->SelectProperty(enumProp);
wxASSERT(pgman->GetGrid()->GetSelection() == enumProp);
const wxPGChoices& choices = enumProp->GetChoices();
int ind = enumProp->InsertChoice(wxT("New Choice"), choices.GetCount()/2);
enumProp->DeleteChoice(ind);
// Recreate the original grid
CreateGrid( -1, -1 );
pgman = m_pPropGridManager;
}
//if ( !(pgman->GetWindowStyleFlag()&wxPG_HIDE_CATEGORIES) )
{
RT_START_TEST(RandomCollapse)