Allow setting custom tooltip text for "New" button in wxPGArrayEditorDialog

Ability to change the tooltip can be useful if standard text "New item" is not descriptive enough.
This commit is contained in:
Artur Wieczorek
2018-12-22 12:30:05 +01:00
parent 686380c331
commit 0fbc4cd6ab
4 changed files with 25 additions and 3 deletions

View File

@@ -2467,6 +2467,12 @@ bool wxPGArrayEditorDialog::Create( wxWindow *parent,
wxEL_ALLOW_EDIT |
wxEL_ALLOW_DELETE);
// Set custom text for "New" button, if provided
if ( !m_customNewButtonText.empty() )
{
m_elb->GetNewButton()->SetToolTip(m_customNewButtonText);
}
// Populate the list box
wxArrayString arr;
for ( unsigned int i=0; i<ArrayGetCount(); i++ )