BCS c++ Populate wxWidget Field


When using wxWidgets text fields are widely used. Here is a utility that initializes a field with a standard string value.
[codesyntax lang=”cpp”]

void MyFrame::initField(string inputValue, wxTextCtrl * field) { // @suppress("Type cannot be resolved")
	wxString dv = inputValue;
	field->Clear(); // @suppress("Method cannot be resolved")
	field->SetEditable(true); // @suppress("Method cannot be resolved")
	field->ChangeValue(dv); // @suppress("Method cannot be resolved")
}

[/codesyntax]
The text field specified in initialized with the content of the standard string.
Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

Leave a Reply

Your email address will not be published. Required fields are marked *