+ //
+ // Demonstrate "AutoComplete" attribute
+ pg->Append( new wxStringProperty( "StringProperty AutoComplete",
+ wxPG_LABEL ) );
+
+ wxArrayString autoCompleteStrings;
+ autoCompleteStrings.Add("One choice");
+ autoCompleteStrings.Add("Another choice");
+ autoCompleteStrings.Add("Another choice, yeah");
+ autoCompleteStrings.Add("Yet another choice");
+ autoCompleteStrings.Add("Yet another choice, bear with me");
+ pg->SetPropertyAttribute( "StringProperty AutoComplete",
+ "AutoComplete",
+ autoCompleteStrings );
+
+ pg->SetPropertyHelpString( "StringProperty AutoComplete",
+ "AutoComplete attribute has been set for this property "
+ "(try writing something beginning with 'a', 'o' or 'y').");
+
+ // Add string property with arbitrarily wide bitmap in front of it. We
+ // intentionally lower-than-typical row height here so that the ugly
+ // scaling code wont't be run.
+ pg->Append( new wxStringProperty( wxT("StringPropertyWithBitmap"),
+ wxPG_LABEL,
+ wxT("Test Text")) );
+ wxBitmap myTestBitmap(60, 15, 32);
+ wxMemoryDC mdc;
+ mdc.SelectObject(myTestBitmap);
+ mdc.Clear();
+ mdc.SetPen(*wxBLACK);
+ mdc.DrawLine(0, 0, 60, 15);
+ mdc.SelectObject(wxNullBitmap);
+ pg->SetPropertyImage( wxT("StringPropertyWithBitmap"), myTestBitmap );
+