Improve documentation of wxPGChoices ctor and Add() methods

Mention that the "labels" array must be NULL-terminated and that
"values" must have at least as many items, if they're provided at all.
This commit is contained in:
Vadim Zeitlin
2018-09-29 16:52:20 +02:00
parent f96c37eacc
commit 378f62bd08
2 changed files with 10 additions and 7 deletions

View File

@@ -719,7 +719,7 @@ public:
}
// Constructor.
// labels - Labels for choices.
// labels - Labels for choices, NULL-terminated.
// values - Values for choices. If NULL, indexes are used.
wxPGChoices( const wxChar* const* labels, const long* values = NULL )
{
@@ -754,7 +754,7 @@ public:
// Adds to current.
// If did not have own copies, creates them now. If was empty, identical
// to set except that creates copies.
// labels - Labels for added choices.
// labels - Labels for added choices, NULL-terminated.
// values - Values for added choices. If empty, relevant entry indexes are used.
void Add( const wxChar* const* labels, const ValArrItem* values = NULL );