wxwidgets

Easiest way to create a scrollable area using wxPython?

Okay, so I want to display a series of windows within windows and have the whole lot scrollable. I've been hunting through the wxWidgets documentation and a load of examples from various sources on t'internet. Most of those seem to imply that a wx.ScrolledWindow should work if I just pass it a nested group of sizers(?): The most auto...

AuiNotebook, where did the event happend.

Hello! How can I find out from which AuiNotebook page an event occurred? EDIT: Sorry about that. Here are a code example. How do I find the notebook page from witch the mouse was clicked in? #!/usr/bin/python #12_aui_notebook1.py import wx import wx.lib.inspection class MyFrame(wx.Frame): def __init__(self, *args, **kwds): ...

Gui toolkits, which should I use?

I am writing a fairly large and complex data analysis program and I have reached the point where I think it is about time to build a GUI for the program. So my question is: Which GUI toolkit should I use? I am completely new to coding and building GUIs and would appreciate any guidance that can be offered. It doesn't have to be the sim...

wxWidgets and VC++

I decided to familiarize myself with wxWidgets today. I downloaded version 2.8.9 (current release), and compiled the library in all the desired modes. I am able to build/run the samples that ship with wxWidgets out of the box. However, when I compile with /Za (i.e., language extensions disabled), I get over 100 build errors on even the ...

How do I set a minimum window size in wxWidgets?

This is the hierarchy of widgets I've got: Frame > wxBoxSizer > wxPanel > wxBoxSizer > wxFlexGridSizer (2 columns, 9 rows), with assorted form fields and buttons inside. The first BoxSizer is to place the panel in, and the second is to make a border around the FlexGrid. Everything looks nice, and the frame can expand properly if the w...

Set the size of wx.GridBagSizer dynamically.

I'm creating an app where I drag button widgets into a panel. I would like to have a visible grid in the panel where i drop the widgets so the widgets will be aligned to the grid. I guess it isn't hard making a grid where the squares are 15x15 pixels using a GridBagSizer(since the widgets will span between multiple cells), but how can t...

How to change cursor position of wxRichTextCtrl in event handler?

I have a RichTextCtrl in my application, that has a handler for EVT_KEY_DOWN. The code that is executed is the following : def move_caret(self): pdb.set_trace() self.rich.GetCaret().Move((0,0)) self.Refresh() def onClick(self,event): self.move_caret() event.Skip() rich is my RichTextCtrl. Here is what I would ...

wxpython auinotebook close tab event.

What event is used when I close a tab in an auinotebook? I tested with EVT_AUINOTEBOOK_PAGE_CLOSE(D). It didn't work. I would also like to fire a right click on the tab itself event. Where can I find all the events that can be used with the aui manager/notebook? Might just be my poor searching skills, but I can't find any lists over th...

Popup menu radio item checks

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 prototy...

Auto-hide panel in QT or WxWidgets

I am looking to find a way to have a docked panel that would be similar to the panels within visual studio. Essentially a panel that can be set to auto hide or can be pinned open. Possibly this question was a bit vague. What I am looking for is essentially this product Please leave a comment if I am missing details as I would like thi...

wxPython auinotebook.GetSelection() return index to the first page.

Why do 'GetSelection()' return the index to the first page and not the last created in 'init' and 'new_panel'? It do return correct index in the 'click' method. The output should be 0 0 1 1 2 2, but mine is 0 0 0 0 0 0. Running latest version of python and wxpython in ArchLinux. Ørjan Pettersen #!/usr/bin/python #12_aui_notebook1.py...

wxWidgets: Crash with wxGLCanvas/wxGLContext

This happens at least with wxWidgets 2.8.9 and 2.8.10 on Windows XP, did not test on other patforms: I have two dlls, a.dll and b.dll, which are VST plugins running in a host sequencer. They make use of wxWidgets and OpenGL. On initialization, I call this in both plugins (but with different m_width and m_height): MyControl(..) { .....

How do you copy and paste rich text to and from the wxRichTextCtrl?

I am using wxruby but as far as I can tell its not only a ruby problem. If I try to copy and paste rich text into the wxRichTextCtrl it loses all the formatting. What am I missing? Is there any way to make this work? ...

wxNotebook Close Button?

I'm developing a notepad app using wxWidgets (the C++ version) and I'm working on implementing multi-file support. Using the wxNotebook class, I can't seem to find any documentation on adding a close button to the pages so I can easily close individual files. Is there a cross-platform way to enable this using the class itself? If not, wh...

Dynamically change the choices in a wx.ComboBox()

I didn't find a better way to change the different choices in a wx.ComboBox() than swap the old ComboBox with a new one. Is there a better way? Oerjan Pettersen #!/usr/bin/python #20_combobox.py import wx import wx.lib.inspection class MyFrame(wx.Frame): def __init__(self, *args, **kwargs): wx.Frame.__init__(self, *args, **...

handling a special character in a string while storing to a record on sqlite

Hi, in the following piece of code, I see that when my 'description' is something like: " ' ' ", I have a problem updating the description to the sqlite record. How do i handle the ' character. thanks! sql = wxString::Format( "UPDATE event SET event_description='%s' WHERE id=%d", description.c_str(), event_id); rc = sqlite3_...

How to override wxApp::MainLoop properly (wxWidgets)?

I'm writing a cross-platform application. Is there a way in wxWidgets to define my own event loop? How to do that? I want it look like an ordinary windows PeekMessage DispachMessage loop: for(;;) { while(PeekMessage(...)) // dispatching all pending messages { // traslating, dispatching messages // also do something wit...

Changing the title of a Tab in wx.Notebook

I'm experimenting with wxPython, I have a tabbed interface (notebook) and each tab is basically a file list view (yes, I'm trying to make a file manager) The file list inherits from wx.ListCtrl, and the tabbed interface inherits from wx.Notebook I'm just starting .. and I had it so double clicking on a folder will cd into that folder,...

How can I get the width of a wx.ListCtrl and its column name?

I'm working in wx.Python and I want to get the columns of my wx.ListCtrl to auto-resize i.e. to be at minimum the width of the column name and otherwise as wide as the widest element or its column name. At first I thought the ListCtrlAutoWidthMixin might do this but it doesn't so it looks like I might have to do it myself (Please correc...

Windows Explorer like folder tree browser

I am trying to implement a platform independent file/directory tree browser. Basically, I am trying to replicate windows explorer's tree control to browse the computer. However, I can't figure out how to find the "Desktop" or "My Computer" folder string (It changes in every pc and os type, version and language). If I can find a way to ge...