28 name = pdb->ReadName (tid,
id);
29 textCtrl->SetValidator ( wxTextValidator (wxFILTER_ASCII, &name) );
31 Fit(); SetMaxSize ( GetSize() );
42 textCtrl->SetValidator ( wxTextValidator (wxFILTER_ASCII, &
name) );
44 Fit(); SetMaxSize ( GetSize() );
49 wxBoxSizer* BoxSizer1;
50 wxBoxSizer* BoxSizer2;
51 wxButton* buttonCancel;
53 wxStaticText* StaticText;
55 Create(0, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE, _T(
"wxID_ANY"));
56 BoxSizer1 =
new wxBoxSizer(wxVERTICAL);
57 staticBoxSizer =
new wxStaticBoxSizer(wxHORIZONTAL,
this, _(
"(previously selected row)"));
58 StaticText =
new wxStaticText(
this, wxID_ANY, _(
"Name:"), wxDefaultPosition, wxDefaultSize, 0, _T(
"wxID_ANY"));
59 staticBoxSizer->Add(StaticText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
60 textCtrl =
new wxTextCtrl(
this,
idTextCtrl, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"idTextCtrl"));
63 BoxSizer1->Add(
staticBoxSizer, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
64 BoxSizer2 =
new wxBoxSizer(wxHORIZONTAL);
65 buttonCancel =
new wxButton(
this, wxID_CANCEL, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"wxID_CANCEL"));
66 BoxSizer2->Add(buttonCancel, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
67 buttonSave =
new wxButton(
this, wxID_SAVE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"wxID_SAVE"));
68 BoxSizer2->Add(
buttonSave, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
69 buttonNew =
new wxButton(
this, wxID_NEW, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _T(
"wxID_NEW"));
70 BoxSizer2->Add(buttonNew, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
71 BoxSizer1->Add(BoxSizer2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5);
74 BoxSizer1->SetSizeHints(
this);
87 TransferDataFromWindow();
91 EndModal (wxID_CANCEL);
95 TransferDataFromWindow();
99 EndModal (wxID_CANCEL);
static const char * tableName[]
Must be defined in the same order as enum tableID.
Interacts with yatish tables in a SQLite database.
bool RecordName(tableID, long, const wxString &)
Modifies or creates a record with only one field (called name).
void OnButtonNewClick(wxCommandEvent &event)
void OnButtonSaveClick(wxCommandEvent &event)
static const long idTextCtrl
yatishDlgName(yatishDBsqlite *, tableID, long)
This constructor initializes the dialog box with data from the SQL record identified by sql_id.
wxStaticBoxSizer * staticBoxSizer