gtransm/gui/design/basepanel.cxx

27 lines
815 B
C++
Raw Normal View History

2025-04-02 10:36:48 +08:00
#include "basepanel.h"
2025-04-03 10:23:46 +08:00
CBasePanel::CBasePanel(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name)
: wxPanel(parent, wxID_ANY, pos, size, style, name)
2025-04-02 10:36:48 +08:00
{
2025-04-03 10:23:46 +08:00
Init();
2025-04-02 10:36:48 +08:00
}
void CBasePanel::Init()
{
auto* topSizer = new wxBoxSizer(wxVERTICAL);
auto* szL1 = new wxBoxSizer(wxHORIZONTAL);
auto* lbIp = new wxStaticText(this, wxID_ANY, _("ServerIP:"));
edIp_ = new wxTextCtrl(this, wxID_ANY, _(""));
auto* lbPort = new wxStaticText(this, wxID_ANY, _("Port:"));
edPort_ = new wxTextCtrl(this, wxID_ANY, _("Port"));
szL1->Add(lbIp, 0, wxALL, 5);
szL1->Add(edIp_, 0, wxALL, 5);
szL1->Add(lbPort, 0, wxALL, 5);
szL1->Add(edPort_, 0, wxALL, 5);
2025-04-03 10:23:46 +08:00
topSizer->Add(szL1, 0, wxEXPAND | wxALL, 5);
this->SetSizer(topSizer);
2025-04-02 10:36:48 +08:00
}