Yesterday I was fiddling with some unrelated problems (AFAIK), and suddenly the sizers (both box sizers and grid sizers) I use in the new window I'm working on stop doing anything. I kept paring away functionality from my window until it's idiot-simple, and I still can't get the sizers to DO anything. The problem does seem to be limited to this new window, but I have no idea why.
I give up. Can you see anything I've done wrong?
BotsSummaryWindow4.h
#include <editorbase.h>
#include <wx/sizer.h>
#include <wx/button.h>
class BotsSummaryWindow4 : public EditorBase
{
public:
BotsSummaryWindow4(wxWindow * parent, wxString title);
};
MAD_Debugging_support.cpp
...
void MAD_Debugging_Support::OnHitSummaryWindow(wxCommandEvent& event)
{
DoStartSummary();
}
void MAD_Debugging_Support::DoStartSummary()
{
if (!m_summaryDisplayed)
{
m_summaryDisplay = new BotsSummaryWindow4((wxWindow *) Manager::Get()->GetEditorManager()->GetNotebook(), wxT("BotsDisplay"));
m_summaryDisplayed = true;
}
m_summaryDisplay->SetFocus();
}
...
BotsSummaryWindow4.cpp
#include "BotsSummaryWindow4.h"
BotsSummaryWindow4::BotsSummaryWindow4(wxWindow * parent, wxString title) : EditorBase(parent, title)
{
wxBoxSizer * buttonsSizer = new wxBoxSizer(wxHORIZONTAL);
wxPanel * helpMeObiwan = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(500, 500));
wxButton * west = new wxButton(helpMeObiwan, wxID_ANY, _T("west"), wxPoint(100, 100));
wxButton * east = new wxButton(helpMeObiwan, wxID_ANY, _T("east"), wxPoint(110, 110));
buttonsSizer->Add(west, TRUE, wxEXPAND | wxALL, 1);
buttonsSizer->Add(east, TRUE, wxEXPAND | wxALL, 1);
helpMeObiwan->SetSizer(buttonsSizer);
}
how it looks
(http://i60.tinypic.com/28hk7eg.png)
This is identical to how it appears if I don't use sizers at all.
-----
I notice also that I've been quite liberal asking for help around here recently. It is appreciated. :)