wxwidgets

If Possible, How Can One Set Either a Background Color on Cells within a Sizer or Gridlines for the Sizer?

I am flailing about with wxWidgets, in particular, the wx.Sizer in wxPython. I have read the documents, I have a copy of wXPython in Action before me, and have set aside the problem to work on other things a better mental model of sizers hopefully gestated within my skull. None of this has worked. I am not grokking, or even getting ...

How to call an programmatically generated event for wxRadioButton in wxWidgets ?

I am trying to programmatically change a value of a wxRadioButton in a way the user would do it. A value change doesn't call the event corresponded to the button, and it make sense since the documentation says it clearly: wxRadioButton::SetValue void SetValue(const bool value) Sets the radio button to selected or deselected status. This...

Executing MSYS from cmd.exe with arguments

Hi, I am trying to learn wxWidgets library, using mingw and msys to compile the code. So far so good, but I can not find a way to send a command to MSYS through CMD.exe. I use SublimeText to edit files, and it has an option to run makefiles. I want my makefiles to be able to open an instance of MSYS and send the g++ command and argument...

Appropriate wx.Sizer(s) for the job?

I have a space in which I would like certain elements (represented here by A, B, D, and G) to each be in its own "corner" of the design. The corners ought to line up as if each of the four elements was repelling the other; a rectangle. This is to be contained within an unresizable panel. I will have several similar panels and want to k...

Is it possible to specify an image in a wxHtmlWindow that is contained within the executable?

I would like my executable to be self-contained. However, the wxHtmlWindow uses an image and it would be nice if the image could be stored inside the executable. Can this be done, and if so how? ...

[wxWidgets] How to store wxImage into database, using C++?

I have some wxImages and I would like to store them into a BLOB (Binary Large OBject) field in a MySQL database. There are no methods in wxImage nor wxBitmap for obtaining the binary data as an array of unsigned char so I can load into the database. My current workaround is to write the image to a temporary file, then load the BLOB f...

How can I ensure that a wxFrame is brought to the foreground?

I have a wxFrame that receives events. Whenever an event comes in, I want the frame to be brought to the foreground. I'm currently using: my_frame->SetFocus(); But that doesn't seem to work for minimized frames. How can I set the frame as the active window and bring it to the front? Alternatively, is there a method that flashes the ...

wxwidgets saveFile

Hi, Im trying to draw a simple picture and save it to a file in wxwidgets. This is the code i have so far. However this code will never create the test.png picture. wxBitmap myBitmap; wxMemoryDC dc; dc.SelectObject(myBitmap); wxFont font=dc.GetFont(); font.SetPointSize(15); dc.SetTextForeground(*wxBLACK); d...

Hierarchical checked tree control with tri-state checkboxes in wxPython?

As per the title, is this possible? By tri-state, I mean the parent node is: Checked if all children are checked Unchecked if all children are unchecked Grey/Filled if some children are checked I have used them previously in C# but cannot find an equivalent control/implementation for wxPython. ...

How to give highest priority to events generated from main thread than those generated from secondary thread in wxWidgets

I have a c++ application written in wxWidgets, which has a main thread (GUI) and a working thread (calculations). The working thread executes commands requested by the main thread and communicates the result to the main thread posting an event after every step of the processing. The problem is that when the working thread is sending ma...

Is it possible to override the HTTP functions in wxHtmlWindow?

I would like wxHtmlWindow to use libcurl instead of the internal wxHTTP class. Is there an easy way to do this? If not, can I at least change the useragent wxHtmlWindow sends when it accesses pages? ...

Should I mix wxpython and pyobjc ?

I have a wxPython based app which I am porting to Mac OS X, in that I need to show some alerts which should look like native mac alerts, so I am using pyobjc for that e.g. import Cocoa import wx app = wx.PySimpleApp() frame = wx.Frame(None, title="mac alert test") app.SetTopWindow(frame) frame.Show() def onclick(event): Cocoa.CFU...

Why Does .Hide()ing and .Show()ing Panels in wxPython Result in the Sizer Changing the Layout?

As referenced in my previous question, I am trying to make something slightly wizard-like in function. I have settled on a single frame with a sizer added to it. I build panels for each of the screens I would like users to see, add them to the frame's sizer, then switch between panels by .Hide()ing one panel, then calling a custom .Sho...

How can I load an MP3 or similar music file for display and analysis in wxWidgets?

I'm developing a GUI in wxPython which allows a user to generate sequences of colours for some toys I'm building. Part of the program needs to load an MP3 (and potentially other formats further down the line) and display it to the user. That should be sufficient to get started but later I'd like to add features like identifying beats and...

wxWidgets/wxPython: Do two identical events cause two handlings?

When there are two identical events in the event loop, will wxPython handle both of them, or will it call the handler only once for them both? I mean, in my widget I want to have an event like EVT_NEED_TO_RECALCULATE_X. I want this event to be posted in all kinds of different circumstances that require x to be recalculated. However, eve...

Compiling wxWidgets 2.9.0 with Visual Studio 2010 Release Candidate

I am trying to compile wxWidgets 2.9.0 with Visual Studio 2010 Release Candidate. When I open the workspace wx.dsw I get a whole list of error messages of the form Blockquote wx_wxReges.dsp cannot be opened because its project type (.dsp) is not supported by this Blockquote version of the application I successfully compiled wi...

Tri-state checkboxes in wxPython's CustomTreeCtrl?

I have a CustomTreeCtrl with some items with children themselves. Unfortunately there is no indication when only some children of an item are selected - the parent checkbox is either checked (all children selected) or unchecked (no children selected). Is there any way of using a tri-state checkbox, rather than the current checked/unche...

"Unhandled exception" error when mixing boost::thread with wxWidgets GUI.

Hello there, I was trying to access a wxDialog members from a boost::thread: void AnotherThread(myWxDialog *dlg) { wxMessageBox(dlg->TextBox1->GetValue(), "It works!"); // This throws an error } void myWxDialog::OnButtonClick(wxCommandEvent &event) { boost::thread myThread(AnotherThread, this); } And I got this error: Unhandled...

Triggering wx.EVT_COMBOBOX after programatically changing ComboBox selection?

As per the title, is there any way to programatically change the selected item in a ComboBox and have it raise an event? I am setting the selected item using myComboBox.SetSelection(index), but this doesn't raise the wx.EVT_COMBOBOX event. ...

IE Security Warning with widgets

Hey I'm creating an ASP.NET application which uses Facebook Connect and fbml tags. It also uses the LinkedIn widget. When I run this app in any browser, there are no warnings and everything works. However, in IE, a message like this comes up: Security Warning: The current webpage is trying to open a site in your Trusted sites list. Do...