Add optional label to wxFileDialogCustomize::AddTextCtrl()

Creating a text with a label is a common operation and can be
implemented to look slightly better than AddStaticText() followed by
AddTextCtrl() without a label when using IFileDialog.
This commit is contained in:
Vadim Zeitlin
2022-05-28 01:26:39 +01:00
parent 095c4dfc94
commit 751a73a2ca
5 changed files with 33 additions and 9 deletions

View File

@@ -1691,8 +1691,7 @@ public:
// Note: all the pointers created here cease to be valid once
// ShowModal() returns, TransferDataFromCustomControls() is the latest
// moment when they can still be used.
customizer.AddStaticText("Just some extra text:");
m_text = customizer.AddTextCtrl();
m_text = customizer.AddTextCtrl("Just some extra text:");
m_cb = customizer.AddCheckBox("Enable Custom Button");
m_cb->Bind(wxEVT_CHECKBOX, &MyCustomizeHook::OnCheckBox, this);
m_btn = customizer.AddButton("Custom Button");