]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/propgrid/propgrid.cpp
Do not use Tooltips if they are disabled
[wxWidgets.git] / samples / propgrid / propgrid.cpp
index 07099777a8bfcf2cc43a461418ff7325f6efe9b2..092b6c6360429ae0d9e9dae6a9eece401272a309 100644 (file)
@@ -477,10 +477,9 @@ wxVectorProperty::wxVectorProperty( const wxString& label,
     : wxPGProperty(label,name)
 {
     SetValue( WXVARIANT(value) );
-    SetParentalType(wxPG_PROP_AGGREGATE);
-    AddChild( new wxFloatProperty(wxT("X"),wxPG_LABEL,value.x) );
-    AddChild( new wxFloatProperty(wxT("Y"),wxPG_LABEL,value.y) );
-    AddChild( new wxFloatProperty(wxT("Z"),wxPG_LABEL,value.z) );
+    AddPrivateChild( new wxFloatProperty(wxT("X"),wxPG_LABEL,value.x) );
+    AddPrivateChild( new wxFloatProperty(wxT("Y"),wxPG_LABEL,value.y) );
+    AddPrivateChild( new wxFloatProperty(wxT("Z"),wxPG_LABEL,value.z) );
 }
 
 wxVectorProperty::~wxVectorProperty() { }
@@ -526,10 +525,9 @@ wxTriangleProperty::wxTriangleProperty( const wxString& label,
     : wxPGProperty(label,name)
 {
     SetValue( WXVARIANT(value) );
-    SetParentalType(wxPG_PROP_AGGREGATE);
-    AddChild( new wxVectorProperty(wxT("A"),wxPG_LABEL,value.a) );
-    AddChild( new wxVectorProperty(wxT("B"),wxPG_LABEL,value.b) );
-    AddChild( new wxVectorProperty(wxT("C"),wxPG_LABEL,value.c) );
+    AddPrivateChild( new wxVectorProperty(wxT("A"),wxPG_LABEL,value.a) );
+    AddPrivateChild( new wxVectorProperty(wxT("B"),wxPG_LABEL,value.b) );
+    AddPrivateChild( new wxVectorProperty(wxT("C"),wxPG_LABEL,value.c) );
 }
 
 wxTriangleProperty::~wxTriangleProperty() { }
@@ -1727,11 +1725,12 @@ void FormMain::PopulateWithExamples ()
     // For testing purposes, combine two methods of adding children
     //
 
-    // AddChild() requires that we call this
-    pid->SetParentalType(wxPG_PROP_MISC_PARENT);
-
-    pid->AddChild( new wxStringProperty(wxT("Latest Release"), wxPG_LABEL, wxT("2.8.8")));
-    pid->AddChild( new wxBoolProperty(wxT("Win API"), wxPG_LABEL, true) );
+    pid->AppendChild( new wxStringProperty(wxT("Latest Release"),
+                                           wxPG_LABEL,
+                                           wxT("2.8.10")));
+    pid->AppendChild( new wxBoolProperty(wxT("Win API"),
+                                         wxPG_LABEL,
+                                         true) );
 
     pg->Append( pid );