wxwidgets

wxgrid , Detecting Scroll event

房东的猫 提交于 2019-12-13 05:58:34
问题 I have created a wxGrid with custom table. Whenever the user scrolls down to very bottom of the grid, I have to load the next 100 rows from my table. I tried EVT_SCROLL_BOTTOM() but I am not able to detect it. What is the right thing to do? Thanks. 回答1: I don't know the answer to your question but I am reminded that the grid was designed to work with an object of type wxGridTableBase that can be extended by the application. By extending this class, you should be able to do whatever caching

Fitting a big grid (wxGrid) in a dialog (wxDialog)

China☆狼群 提交于 2019-12-13 05:40:02
问题 Here is my layout: I have a sizer that contains a grid (with a proportion of 1) and a ok/cancel button bar The all thing is in a wxDialog Here it is: ||||||||||||||| | | | GRID | | | | | | | ||||||||||||||| | OK CANCEL | ||||||||||||||| The issue is that the grid contains too many row, and over flow the screen, so in the end I don't see the top part of the dialog. Is there a way, when calling Fit() on the dialog, to limit its height ? I have tried stuff like this: SetSizeHints(-1,-1,-1,500);

Can't build the new wxWidgets. What should i do?

那年仲夏 提交于 2019-12-13 05:32:10
问题 I'm feeling a bit dumb, but i can't build the new wxWidgets. I want to use codelite + mingw + wxWidgets, so i download the latest releases: CodeLite 9.1.3 (http://downloads.codelite.org/downloads.php?windows_weekly_64) The installer make me download the TDM-GCC-64 setup and install it. Then i downloaded wxWidgets-3.1.0 (https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxMSW-3.1.0-Setup.exe) Codelite detected the the compiler, now i should build the wxWidgets, but the pages i've

Validating data in wxPython

ε祈祈猫儿з 提交于 2019-12-13 05:11:40
问题 I'm trying to create Validators for inputs on forms. I learned already that in wxPython it is necessary to inherit from wx.Validator due to lack of support for standard wxTextValidator and others. My question is: how effectively check that string complies to simple rules (no regexp please) acceptableChars = ['a', 'b', ...] all(char in acceptableChars for char in string) is something like this efficient? and how to cleanly specify all alphanumeric or digits? or maybe is there any ready class

How to call an event handler method directly in wxWidgets without an event

孤人 提交于 2019-12-13 04:34:27
问题 Visual Studio 2008 C++ Windows Xp SP3 I have created a wxWidgets form (using wxFormBuilder) and have buttons/menus/toolbars all generating events to call various methods (all this works perfectly). Each of these event methods is defined like this: void cLoggingFrame::me_InsertCommentText(wxCommandEvent& event); Now, what I want to be able to do is 're-use' some of these methods by calling them directly. I don't want to generate an event to be handled, I want the method to run when I call it.

wxWidgets (wxRuby) with Ruby 2.0

独自空忆成欢 提交于 2019-12-13 04:24:22
问题 I'm looking for an Win32 wxRuby gem for Ruby 2.0, does someone know where to find it? I didn't have success trying to build it and it seems the project is dead. 回答1: Latest ruby version which supports wxruby gem is 1.9.1 (gem is named wxruby-ruby19, gem named wxruby is dedicated for ruby 1.8) and wxruby project is no longer developed. So if you need to use ruby 2.0 you are on your own now. But try to ask at http://www.ruby-forum.com/forum/wxruby where some of former wxruby developers are

wxImage and draw raw rgb bytes

一笑奈何 提交于 2019-12-13 04:09:44
问题 I am programming image viewer as school task and I cant use any libraries for reading or manipulating images. First I started with bmp format. I have created class for handle this type of file. As GUI framework I am using wxWidgets. So I have plain rgb bytes array, prepared for wxImage constructor wxImage(int width, int height, unsigned char* data, bool static_data = false). Problem is that when I convert it to wxBitmap and draw to dc it's ignoring rgb values a draw only black picture. I

Compiling WxWidgets on Mac OSX 10.10

£可爱£侵袭症+ 提交于 2019-12-13 03:46:52
问题 I'm trying to compile WxWidgets 3.0.2 on my mac OSX 10.10 and I get the following message: Blockquote ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [/Users/.../wxWidgets-3.0.2/build_rel/lib/libwx_osx_cocoau-3.0.0.2.0.dylib] Error 1 I'm compiling using these flags ../configure --with-osx_cocoa --with-macosx-version-min=10.7 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms

Popup menu radio item checks

点点圈 提交于 2019-12-13 03:25:30
问题 I'm using a popup menu with wxTaskBarIcon on windows (wxWidgets-2.8.9). If I fill popup menu with radio items, they do not change state when clicked. First item in popup menu list is marked as selected. But selecting any other item does not change this. Currently there is no item click event handler (application is more like UI prototype). Should i manually update item check status in this handler or it is still framework duty? 回答1: You should use EVT_UPDATE_UI(yourCommandID, yourEventHandler

Embedding mayaVI within wxPython

爱⌒轻易说出口 提交于 2019-12-13 03:20:57
问题 UPDATE: I've placed print commands within the code to isolate the moment of error. The output for the below code is a b c d . I ended up switching to pyqt/pyside using the alternative code provided, but please let me know if I can help in any other way from my current setup in debugging this issue. from numpy import ogrid, sin from traits.api import HasTraits, Instance from traitsui.api import View, Item from mayavi.sources.api import ArraySource from mayavi.modules.api import IsoSurface from