OpenCPN Partial API docs
Loading...
Searching...
No Matches
TextField Class Reference

Text field with validator and error handler. More...

#include <field_text.h>

Inheritance diagram for TextField:

Public Member Functions

 TextField (wxWindow *parent, const wxString &label, const wxString &value="", wxWindowID id=wxID_ANY)
 Add new text field to the form grid.
 
void OnError (const wxString &msg)
 Shows an error below the text field.
 
void SetValidator (const wxValidator &validator=wxDefaultValidator) override
 
void OnTextChanged (wxCommandEvent &event)
 Text changed event handler.
 

Detailed Description

Text field with validator and error handler.

Definition at line 38 of file field_text.h.

Constructor & Destructor Documentation

◆ TextField()

TextField::TextField ( wxWindow *  parent,
const wxString &  label,
const wxString &  value = "",
wxWindowID  id = wxID_ANY 
)

Add new text field to the form grid.

It requires a parent window with form grid, to layout label and field in the grid columns.

Parameters
parentParent window.
labelField label.
valueField value.
idWindow identifier.

Member Function Documentation

◆ OnError()

void TextField::OnError ( const wxString &  msg)

Shows an error below the text field.

Parameters
msgError message.

◆ OnTextChanged()

void TextField::OnTextChanged ( wxCommandEvent &  event)

Text changed event handler.

Parameters
eventChange event.

The documentation for this class was generated from the following file: