Replaced 'InlineHelp' property attribute with 'Hint'; Use SetHint() wxTextCtrl and wxComboCtrl member function to set it; Added a small section about help string and hint text in propgrid overview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1319,10 +1319,16 @@ void FormMain::PopulateWithStandardItems ()
|
||||
pg->SetPropertyAttribute(wxT("Height"), wxPG_ATTR_MAX, (long)2048 );
|
||||
pg->SetPropertyAttribute(wxT("Height"), wxPG_ATTR_UNITS, wxT("Pixels") );
|
||||
|
||||
// Set value to unspecified so that InlineHelp attribute will be demonstrated
|
||||
pg->SetPropertyValueUnspecified(wxT("Height"));
|
||||
pg->SetPropertyAttribute(wxT("Height"), wxPG_ATTR_INLINE_HELP, wxT("Enter new height for window") );
|
||||
pg->SetPropertyHelpString(wxT("Height"), wxT("This property uses attributes \"Units\" and \"InlineHelp\".") );
|
||||
// Set value to unspecified so that Hint attribute will be demonstrated
|
||||
pg->SetPropertyValueUnspecified("Height");
|
||||
pg->SetPropertyAttribute("Height", wxPG_ATTR_HINT,
|
||||
"Enter new height for window" );
|
||||
|
||||
// Difference between hint and help string is that the hint is shown in
|
||||
// an empty value cell, while help string is shown either in the
|
||||
// description text box, as a tool tip, or on the status bar.
|
||||
pg->SetPropertyHelpString("Height",
|
||||
"This property uses attributes \"Units\" and \"InlineHelp\"." );
|
||||
|
||||
pg->Append( new wxIntProperty(wxT("Width"),wxPG_LABEL,640) );
|
||||
pg->SetPropertyAttribute(wxT("Width"), wxPG_ATTR_MIN, (long)10 );
|
||||
@@ -1547,6 +1553,7 @@ void FormMain::PopulateWithExamples ()
|
||||
soc.Add( wxT("Look, it continues"), 200 );
|
||||
soc.Add( wxT("Even More"), 240 );
|
||||
soc.Add( wxT("And More"), 280 );
|
||||
soc.Add( "", 300 );
|
||||
soc.Add( wxT("True End of the List"), 320 );
|
||||
|
||||
// Test custom colours ([] operator of wxPGChoices returns
|
||||
@@ -1569,6 +1576,12 @@ void FormMain::PopulateWithExamples ()
|
||||
pg->Append( new wxEnumProperty(wxT("EnumProperty 3"),wxPG_LABEL,
|
||||
soc, 240 ) );
|
||||
|
||||
// Test Hint attribute in EnumProperty
|
||||
pg->GetProperty("EnumProperty 3")->SetAttribute("Hint", "Dummy Hint");
|
||||
|
||||
pg->SetPropertyHelpString("EnumProperty 3",
|
||||
"This property uses \"Hint\" attribute.");
|
||||
|
||||
// 'soc' plus one exclusive extra choice "4th only"
|
||||
pg->Append( new wxEnumProperty(wxT("EnumProperty 4"),wxPG_LABEL,
|
||||
soc, 240 ) );
|
||||
@@ -1680,6 +1693,9 @@ void FormMain::PopulateWithExamples ()
|
||||
eech,
|
||||
"Choice not in the list") );
|
||||
|
||||
// Test Hint attribute in EditEnumProperty
|
||||
pg->GetProperty("EditEnumProperty")->SetAttribute("Hint", "Dummy Hint");
|
||||
|
||||
//wxString v_;
|
||||
//wxTextValidator validator1(wxFILTER_NUMERIC,&v_);
|
||||
//pg->SetPropertyValidator( wxT("EditEnumProperty"), validator1 );
|
||||
|
Reference in New Issue
Block a user