|
From: James Yu on 21 Apr 2008 20:02 I used to program my GUI in Python with wxPython and just start playing wxWidgets in C++ lately (on Windows with mingw). However, I am still unable to create my button with the look and feel as in wxPython, please take a look at my screenshot at: http://memyselfandtaco.blogspot.com/2008/04/button-not-showing-correctly.html I created the buttons in wxWidgets and wxPython with the following lines. The codes are virtually identical, but the look and feel differs somehow. wxWidgets: cancelButton = new wxButton(panel, (wxWindowID)ID_CANCEL_BUTTON, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); wxPython: ctrlButton = wx.Button(parent=self, id=-1, label=label.decode('utf-8'), style=wx.BU_EXACTFIT) Other than style, is there any other trick to configure a window's appearance? Any help is appreciated. Regards, -- This is a UTF-8 formatted mail ----------------------------------------------- James C.-C.Yu
From: Vadim Zeitlin on 21 Apr 2008 21:47 On Tue, 22 Apr 2008 08:02:15 +0800 James Yu <cyu021(a)gmail.com> wrote: JY> The codes are virtually identical, but the look and feel differs somehow. One uses the manifest and hence has the native XP look, the other one does not. If you use a recent wx version, manifest should be automatically included provided you include wx/msw/wx.rc in your resource file. If you don't know about the resource files and such, looking at the minimal sample make/project files should help. Regards, VZ -- TT-Solutions: wxWidgets consultancy and technical support http://www.tt-solutions.com/
|
Pages: 1 Prev: application not finalizing when top window closes Next: wxDir::HasFiles |