wxwidgets

wxpython - Expand list control vertically not horizontally

I have a ListCtrl that displays a list of items for the user to select. This works fine except that when the ctrl is not large enough to show all the items, I want it to expand downwards with a vertical scoll bar rather than using a horizontal scroll bar as it expands to the right. The ListCtrl's creation: self.subjectList = wx.ListCtr...

Graphically laying out wx app

Being really new to wx, I'm wondering if there is an IDE (especially for Linux) which would help me lay out a frame or dialog or whatever just to help me see what I'm doing. That means also creating the code for those changes. I remember way back when using resource compilers for OS/2 and Windows that produced binaries that would then ...

ie useragent wxWidgets

Hello, Im currently using ie as an active x com thing on wxWidgets and was wanting to know if there is any easy way to change the user agent that will always work. Atm im changing the header but this only works when i manually load the link (i.e. call setUrl) ...

Howto determine the size of a string give the current font in wxWidgets

Is there a way to determine the display length of a given string (in pixels) based on the currently selected font in (C++) wxWidgets? For example if I print out the string "Speed:" and want to put 10 pixels between the ':' and the value about to follow, I need to know how long the "Speed:" string was. Is there a way to determine this? ...

How to insert a copyright statement into files created by wxGlade?

I use wxGlade to create Python scripts, which use wxWidgets. wxGlade directly manipulates XML files, which describe the wxWidgets based GUI. Those files have the *.wxg extension. From the *.wxg files, it is possible to generate code which actually runs the GUI in one of several languages, and I am using it to generate Python code. I wo...

wxWidgets sizer problem

I'm still getting used to the sizers in wxWidgets, and as such can't seem to make them do what I want... Basicly I wantt a large panel that will contain a list of other panels/boxes, which each then contain a set of text fields ---------------------- | label text box | | label2 text box2 | ---------------------- -----------------...

hidden information in wxGrid

I've got a wxGrid that I populate dynamically. I'd like to store some information with each row that shouldn't be displayed to the user. What is the best way to associate data with a row? Should I just create a hidden column or is there a better way? ...

Posting to a URL with wxWidgets

Does anyone have some sample code showing how to POST to a URL using wxWidgets? The documentation and discussion forums imply that it's possible but the methods in wxHTTP are very low-level compared to what you find in .NET and scripting languages like Perl and Ruby. Do I actually have to create the HTTP request myself and send it to the...

How do I limit mouse pointer movement in wxWidgets?

Is there a way to limit mouse pointer movement to a specific area in wxWidgets? I know there is an API function ClipCursor() in Windows, but is there a method in wxWidgets for all platforms? ...

How to create a QWidget with a HWND as parent?

With wxWidgets I use the following code: HWND main_window = ... ... wxWindow *w = new wxWindow(); wxWindow *window = w->CreateWindowFromHWND(0, (WXHWND) main_window); How do I do the same thing in Qt? The HWND is the handle of the window I want as the parent window for the new QtWidget. ...

Is there any 'out-of-the-box' 2D/3D plotting library for C++?

Hello all, I looked at the different options for plotting functions (or other types of graphs) in an interactive window. I mostly use wxWidgets but I'd be open to any other "interfaces". Looking at what is available, here is what I've found: wxPlot: Not updated since 2006. But it would be a good candidate if it was... wxMathPlot: Ve...

How to make the wxWidgets wxCmdLineParser object print its messages to the console?

Background I'm using wxWidgets 2.8.7 to make a console application that takes command line parameters. To parse these parameters, I'm using the wxCmdLineParser class. When an invalid parameter is provided to the application, the desired behavior - and the one described by the wxCmdLineParser documentation - is to print the usage message...

wxWidget multiline notebook - cannot see 2nd line

This code works perfectly myNotebook = new wxNotebook( this, IDC_NOTEBOOK, wxDefaultPosition, wxSize(500, 500) ); myNotebook->AddPage( new wxNotebookPage( myNotebook, -1 ), L"TEST RECOMMENDATIONS 1" ); myNotebook->AddPage( new wxNotebookPage( myNotebook, -1 ), L"TEST RECOMMENDATIONS 2" ); myNotebook->AddPage( new wxNotebookPage( myNoteb...

Open source simple C++ with wxWidgets GUI applications

Hi, I would like to write a simple GUI application using C++ and wxWidgets. I'm wondering if there are any open source GUI applications using C++ and wxWidgets and tutorials for reference. Thanks, ...

wxWidgets: Is there any way to avoid or to speed up wxBitmap::ConvertToImage() ?

To get some smooth graphics, I want to draw oversampled by factor 2 and scale down afterwards. So what I am doing is to draw oversampled on a wxBitmap in a wxMemoryDC, and then scale it down before copying to my dc. The code below works fine, but bitmapOversampled.ConvertToImage(); is extremely slow. Is there any way to achieve the sam...

How do I create a wx.Image object from in-memory data?

I'm writing a GUI application in Python using wxPython and I want to display an image in a static control (wx.StaticBitmap). I can use wx.ImageFromStream to load an image from a file, and this works OK: static_bitmap = wx.StaticBitmap(parent, wx.ID_ANY) f = open("test.jpg", "rb") image = wx.ImageFromStream(f) bitmap = wx.BitmapFromImag...

How to set and preserve minimal width?

I use some wx.ListCtrl classes in wx.LC_REPORT mode, augmented with ListCtrlAutoWidthMixin. The problem is: When user double clicks the column divider (to auto resize column), column width is set to match the width of contents. This is done by the wx library and resizes column to just few pixels when the control is empty. I tried calli...

wxWidgets : non blocking copy to FTP

I want to copy a file to a FTP server using wxFTP, but I would like to do this without blocking the UI, and much better, while displaying a progress bar. Can I do this without extra thread? I'm using wxLua, but I can adapt a solution written in any language as long as it uses a wxWidgets binding. ...

wxLua: upload files with wxFtp

I'm trying to use wxFTP on wxLua to upload several files. It works with the 1st file, but I do not understand why I cannot send a 2nd file. Here is a sample that fails : local ftp = wx.wxFTP() local ftpAddress = wx.wxIPV4address() ftpAddress:Service( "ftp" ) ftpAddress:Hostname( "ftp.example.com" ) ftp:Connect( ftpAddress ) local out1 =...

Calling Application Methods from a wx Frame Class

I'm starting out with wxPython and have been working my way through every tutorial and example I can get my hands on. I've run into a slight problem, however, and it has to do with the wx.App versus the wx.Frame and which should contain specific methods. Just about every example I've seen don't go much beyond layouts/sizers and event h...