1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| wxBitmap StatusBitmaps[3];
StatusBitmaps[0] = wxBitmap(_("img/red.png"),wxBITMAP_TYPE_PNG);
StatusBitmaps[1] = wxBitmap(_("img/green.png"),wxBITMAP_TYPE_PNG);
StatusBitmaps[2] = wxBitmap(_("img/blue.png"),wxBITMAP_TYPE_PNG);
wxBoxSizer* StatusBar = new wxBoxSizer(wxHORIZONTAL);
wxStaticText* Reper = new wxStaticText(Panel, wxID_ANY, wxT("Reper: "));
id_1 = new wxStaticText(Panel, wxID_ANY, _(" "));
id_2 = new wxStaticText(Panel, wxID_ANY, _(" "));
id_3 = new wxStaticText(Panel, wxID_ANY, _(" "));
Density = new wxStaticText(Panel, wxID_ANY, _("Density : 0"));
StatusBar->Add(Reper,0,wxALL,3);
StatusBar->Add(new wxStaticBitmap(Panel,wxID_ANY,StatusBitmaps[0],wxDefaultPosition,wxDefaultSize,0,_("staticBitmap1")),0,wxALL,0);
StatusBar->Add(id_1,0,wxALL,3);
StatusBar->Add(new wxStaticBitmap(Panel,wxID_ANY,StatusBitmaps[1],wxDefaultPosition,wxDefaultSize,0,_("staticBitmap2")),0,wxALL,0);
StatusBar->Add(id_2,0,wxALL,3);
StatusBar->Add(new wxStaticBitmap(Panel,wxID_ANY,StatusBitmaps[2],wxDefaultPosition,wxDefaultSize,0,_("staticBitmap3")),0,wxALL,0);
StatusBar->Add(id_3,0,wxALL,3);
//StatusBar->SetItemMinSize((size_t)1, 50, 20);
StatusBar->AddSpacer(1150);
StatusBar->Add(Density,0,wxALL,3);
//StatusBar->Add(StText,0,wxALL,3);
Panel->SetAutoLayout(TRUE);
Panel->SetSizer(StatusBar);
StatusBar->Fit(Panel);
GetSizer()->SetSizeHints(Panel); |
Partager