void OnTestWin(wxCommandEvent& event);
void OnUsersMenu(wxCommandEvent& cmd);
void OnWindowMenu(wxCommandEvent& cmd);
+ void MyFrame::OnSize(wxSizeEvent& event);
wxButton *do_cmd;
void InitToolBar(wxToolBar* toolBar);
EVT_MENU( WMENU_NEXT, MyFrame::OnWindowMenu)
EVT_MENU( WMENU_PREVIOUS, MyFrame::OnWindowMenu)
EVT_BUTTON( BUTTON_DO_CMD, MyFrame::OnDoCmd)
+ EVT_SIZE( MyFrame::OnSize)
END_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// Show it and tell the application that it's our main window
// @@@ what does it do exactly, in fact? is it necessary here?
- frame->SetAutoLayout(TRUE);
- frame->Show(TRUE);
SetTopWindow(frame);
// success: wxApp::OnRun() will be called which will enter the main message
RoomList = new RoomTree(this, citadel);
+/*
wxLayoutConstraints *t2 = new wxLayoutConstraints;
t2->top.SameAs(this, wxTop, 4);
t2->left.SameAs(this, wxLeft, 0);
t3->right.SameAs(this, wxRight, 0);
t3->bottom.SameAs(this, wxBottom, 0);
wxMDIClientWindow *children = GetClientWindow();
- children->SetConstraints(t3);
-
+ children->SetConstraints(t3);
+ */
// Set up the toolbar
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(3);
SetStatusText("Not connected", 0);
+
+ /* SetAutoLayout(TRUE);
+ Layout(); */
+ Show(TRUE);
+
}
wxString DefaultHost, DefaultPort;
DefaultHost = "uncnsrd.mt-kisco.ny.us";
- DefaultPort = "citadel";
+ DefaultPort = "504";
if (citadel->IsConnected()) {
wxMessageBox("You are currently connected to "
new TestWindow(citadel, this);
}
+void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) )
+{
+ int w, h;
+ GetClientSize(&w, &h);
+
+ RoomList->SetSize(0, 0, 200, h);
+ GetClientWindow()->SetSize(200, 0, w - 200, h);
+}