wxwidgets

Find text dialog with wxpython

99封情书 提交于 2020-01-11 12:21:28
问题 Does anyone have a very simple example of using a find dialog with a text component in wxpython? Thanks in advance. 回答1: The use of wx.FindReplaceDialog is not so straighforward as we could expect from its name. This dialog gives you a dialog widget with parameters and entries for a search (or replace) action, You can read these parameters and the string to find from the dialog (actually from the event or from the wx.FindReplaceData object). However reading, searching and/or replacing on a

Find text dialog with wxpython

谁说我不能喝 提交于 2020-01-11 12:21:16
问题 Does anyone have a very simple example of using a find dialog with a text component in wxpython? Thanks in advance. 回答1: The use of wx.FindReplaceDialog is not so straighforward as we could expect from its name. This dialog gives you a dialog widget with parameters and entries for a search (or replace) action, You can read these parameters and the string to find from the dialog (actually from the event or from the wx.FindReplaceData object). However reading, searching and/or replacing on a

what does mean by debug build and release build, difference and uses [duplicate]

隐身守侯 提交于 2020-01-10 03:15:09
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Debug/Release difference I want to know what do these two mean: Debug build and Release build and what is the difference between both. Which one should I use (I mean which are the suitable conditions for each one) and which build actually I am using now if I make a simple C++ project in Visual studio. [If I do not change any projects settings] I am asking this because I am trying to make a GUI using wxWidgets 2

gettext: How to fall back to the base language?

喜欢而已 提交于 2020-01-07 02:30:33
问题 I am planning to rewrite our application using wxWidgets. Also because of that I would like to use the gettext way of working with human languages. We currently use four of them: Czech, Slovak, English, and German. The specific languages are not that important. What is important, the Czech and English are considered a kind of base languages. This means that if the use switches to German, and the text is not defined there, he or she automatically gets the English text (no problem with gettext

How to set the GenericDirCtrl to show custom folder as top directory in wxpython?

隐身守侯 提交于 2020-01-07 01:52:28
问题 I want to show my folder as top directory in wxPython's GenericDirCtrl component. I tried SetPath() and path in my code but it only focuses the selected folder , not making it the top of the tree. In my form's constructor i create it like that: self.folder_tree_project = wx.GenericDirCtrl(self.pnl_edit, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size(200, -1), wx.DIRCTRL_3D_INTERNAL | wx.SUNKEN_BORDER, wx.EmptyString, 0) self.folder_tree_project.ShowHidden(False) bSizer5.Add(self

Size wxDialogs so all of the text is inside the Dialog

感情迁移 提交于 2020-01-06 18:33:32
问题 My wxWidgets program should work on both desktop PC and Windows tablet. Both use Windows 10 Pro 64-bit version. How can I make it, that a text with a changing size is inside a dialog no matter where it is displayed? This is what I do now: TrackDialog::TrackDialog(wxWindow* parent,wxWindowID id,const wxPoint& pos, const wxSize& size) { //(*Initialize(TrackDialog) wxBoxSizer* BoxSizer4; wxBoxSizer* BoxSizer5; wxBoxSizer* BoxSizer2; wxBoxSizer* BoxSizer1; wxBoxSizer* BoxSizer3; wxBoxSizer*

wxwidgets and threads

北城以北 提交于 2020-01-06 13:56:16
问题 In my application I run wglGetCurrentDC() and wglGetCurrentContext() from onThread function (this function should be called as declared here - EVT_THREAD(wxID_ANY,MyCanvas::onThread) ) and I get NULL in both cases. When I run it not from onThread it is ok… What is work around in order to solve the problem – (I have to run them when getting event from the thread!) As Alex suggested I changed to wxPostEvent to redirect the event to main thread, which catches the event in its onThread function

how can I sort by alphabetically the items of a wxListCtrl simply?

可紊 提交于 2020-01-06 08:47:09
问题 can anyone give me a short explanation about how to sort by alphabetically the items of a wxListCtrl? I think that I found a way but it seems too complicated. Thank You in advance! 回答1: You can set the style as mentioned in the comment and you also can use SortItems method like this: listCtrl->SortItems(CompareFunction, 0); When compare function should act similar to strcmp : int wxCALLBACK CompareFunction(wxIntPtr item1, wxIntPtr item2, wxIntPtr WXUNUSED(sortData)) { if(item1<item2) return

why mingw32 and tdm-gcc64 behave differently using external gcc

大憨熊 提交于 2020-01-06 03:38:30
问题 I am trying to cabal install a component of wxHaskell (Haskell platform 2013.2 against wxWidgets 3.0). I was able to compile the git version with 32 bit mingw from mingw.org. But in the end, the installed wx cannot function correct, and running a minimal example gives runtime exceptions in wxc.dll. So I try to compile the same thing under TDM-GCC 4.8.1 64bit, since the wxWidgets people provide their binary in the form of TDM-GCC compiled binaries. But I immediately run into compilation errors

wxPython: text alignment does not work

一曲冷凌霜 提交于 2020-01-05 08:45:13
问题 For some reasons the wx.ALIGN_* does not align anything on Ubuntu, while it works on Mac OS X: self.static_text = wx.StaticText(self, -1, 'hello, world', pos=(0,0), size=(300,30), style=wx.ALIGN_CENTER) Any idea, what could it be? Update: This was tried with wxPython 2.8.12.1 on Mac OS X 10.7.2. wxPython 2.8.11.0 on Ubuntu 11.10. Update 2: Does not work either on Debian 6.0.3 with wxPython 2.8.12.1 Update 3: All of the above was tested with Python 2.6 回答1: I have test this code snippet in Win