Grafikfehler
-
Hallo an alle,
Bei meiner GUI hab ich immer Grafikfehler. Das Ganze zeigt ich im oberen Bereich.
Hier ein Screenshot: http://bildrian.de/n/b/6fe0ab1b9e9a61e8.png
Weiß jemand was da los ist?
Und wie bekomme ich oben in der Leiste Maximieren und Minimieren noch dazu?
Gibt es eine Möglichkeit, die HIntergrundfarbe in das Standard Grau zu ändern?
Danke im Vorau
Gruß Robert
-
Welches GUI-Toolkit? Quellcode?
-
wxDev C++ mit den wxWidgets.
Hier der Code vom Frame:
void usbprogFrm::CreateGUIControls() { //Do not add custom code between //GUI Items Creation Start and GUI Items Creation End //wxDev-C++ designer will remove them. //Add the custom code before or after the blocks ////GUI Items Creation Start WxStaticBox1 = new wxStaticBox(this, ID_WXSTATICBOX1, wxT("Usbprog Update Tool"), wxPoint(3,22), wxSize(447,253)); WxStaticBox1->SetFont(wxFont(9, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); wxArrayString arrayStringFor_WxComboBox1; WxComboBox1 = new wxComboBox(this, ID_WXCOMBOBOX1, wxT("Usbprog"), wxPoint(180,45), wxSize(197,21), arrayStringFor_WxComboBox1, 0, wxDefaultValidator, wxT("WxComboBox1")); WxComboBox1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); wxArrayString arrayStringFor_WxComboBox2; WxComboBox2 = new wxComboBox(this, ID_WXCOMBOBOX2, wxT(""), wxPoint(180,75), wxSize(197,21), arrayStringFor_WxComboBox2, 0, wxDefaultValidator, wxT("WxComboBox2")); WxComboBox2->Enable(false); WxComboBox2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxStaticText1 = new wxStaticText(this, ID_WXSTATICTEXT1, wxT("Device"), wxPoint(120,52), wxDefaultSize, 0, wxT("WxStaticText1")); WxStaticText1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxRadioButton1 = new wxRadioButton(this, ID_WXRADIOBUTTON1, wxT("Online Pool"), wxPoint(102,76), wxSize(75,19), 0, wxDefaultValidator, wxT("WxRadioButton1")); WxRadioButton1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxRadioButton2 = new wxRadioButton(this, ID_WXRADIOBUTTON2, wxT("Local Disk"), wxPoint(102,106), wxSize(69,19), 0, wxDefaultValidator, wxT("WxRadioButton2")); WxRadioButton2->SetValue(true); WxRadioButton2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxEdit1 = new wxTextCtrl(this, ID_WXEDIT1, wxT("C:\\"), wxPoint(180,105), wxSize(197,19), 0, wxDefaultValidator, wxT("WxEdit1")); WxEdit1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxStatusBar1 = new wxStatusBar(this, ID_WXSTATUSBAR1); WxEdit2 = new wxTextCtrl(this, ID_WXEDIT2, wxT(""), wxPoint(180,209), wxSize(254,19), 0, wxDefaultValidator, wxT("WxEdit2")); WxEdit2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxStaticText2 = new wxStaticText(this, ID_WXSTATICTEXT2, wxT("Status"), wxPoint(128,211), wxDefaultSize, 0, wxT("WxStaticText2")); WxStaticText2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxButton1 = new wxButton(this, ID_WXBUTTON1, wxT("Quit"), wxPoint(359,141), wxSize(75,25), 0, wxDefaultValidator, wxT("WxButton1")); WxButton1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxButton3 = new wxButton(this, ID_WXBUTTON3, wxT("Update"), wxPoint(270,143), wxSize(75,25), 0, wxDefaultValidator, wxT("WxButton3")); WxButton3->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxGauge1 = new wxGauge(this, ID_WXGAUGE1, 100, wxPoint(180,178), wxSize(254,16), wxGA_HORIZONTAL, wxDefaultValidator, wxT("WxGauge1")); WxGauge1->SetRange(100); WxGauge1->SetValue(0); WxGauge1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxListCtrl1 = new wxListCtrl(this, ID_WXLISTCTRL1, wxPoint(15,46), wxSize(82,194), wxLC_REPORT); WxListCtrl1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxButton2 = new wxButton(this, ID_WXBUTTON2, wxT("Browse"), wxPoint(383,105), wxSize(51,21), 0, wxDefaultValidator, wxT("WxButton2")); WxButton2->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxStaticText3 = new wxStaticText(this, ID_WXSTATICTEXT3, wxT("Created by Benedikt Sauter and Robert Schillig"), wxPoint(120,246), wxDefaultSize, 0, wxT("WxStaticText3")); WxStaticText3->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxToolBar1 = new wxToolBar(this, ID_WXTOOLBAR1, wxPoint(0,0), wxSize(458,7)); WxToolBar1->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxButton4 = new wxButton(this, ID_WXBUTTON4, wxT("Refresh"), wxPoint(383,45), wxSize(51,21), 0, wxDefaultValidator, wxT("WxButton4")); WxButton4->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxButton5 = new wxButton(this, ID_WXBUTTON5, wxT("Refresh"), wxPoint(383,75), wxSize(51,21), 0, wxDefaultValidator, wxT("WxButton5")); WxButton5->Enable(false); WxButton5->SetFont(wxFont(8, wxSWISS, wxNORMAL,wxNORMAL, false, wxT("Tahoma"))); WxOpenFileDialog1 = new wxFileDialog(this, wxT("Choose a file"), wxT("C:\\"), wxT(""), wxT("*.*"), wxOPEN); WxToolBar1->Realize(); SetToolBar(WxToolBar1); SetStatusBar(WxStatusBar1); SetTitle(wxT("Usbprog-Update GNU/GPL2")); SetIcon(wxNullIcon); SetSize(116,180,466,332); Center(); ////GUI Items Creation End }
Gruß Robert
-
Die Hintergrundfarbe kannst du mit SetBackgroundColour ändern.
Oder in dem du die ganzen Steuerelemente in eine von wxPanel abgeleitete Klasse packst.
Minimize und Maximize müsste eigentlich jeder GUI Editor unterstützen.Hier der Notwendige Code aus einem wxFrame Konstruktor:
Create(parent,id,_("Welcome to wxSmith application"),wxDefaultPosition,wxDefaultSize,wxCAPTION|wxTHICK_FRAME|wxSYSTEM_MENU|wxRESIZE_BOX|wxCLOSE_BOX|wxMINIMIZE_BOX,_T("")); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
-
Danke
Weiß jemand was da oben mit dem Grafikfehler ist?
-
Grafikfehler ist beseitigt.
Wenn ich das mit der Farbe reingeb n den Code, dann passt alles. Aber nur einmal. Beim nächsten kompilieren wird das wierder rausgelöscht.
Weiß jemand warum?
Gruß Robert
-
Evtl. erzeugt dein GUI Editor dann wieder den "alten" Code.
-
Wo kann man das umstellen?
Ich benutz wxDev C++.
-
Ka. Würde auch von (wx)Dev C++ abraten. Benutze MSVS Express oder Codeblocks, das sind imho viel bessere Alternativen.
-
Hallo,
Bin leider auf Open Source Anwendungen angewiesen.
Aber es geht nun auch. Wenn ich unnter de Kommentar ////GUI Items Creation End was reinschreib, dann wirds rausgelöscht. Wenn ich es darüber schreib gehtsDanke
-
Codeblocks ist auch Opensource (GPL).