Search found 15814 matches
- Tue Apr 13, 2021 5:23 pm
- Forum: C++ Development
- Topic: ClientData mysery
- Replies: 1
- Views: 35
Re: ClientData mysery
If you use the overload that takes a "void*", the object must be allocated on the heap and you're responsible for deleting it. If you use the overload that takes a "wxClientData*", the object must also be allocated on the heap but the listbox takes ownership and deletes it. If you only want to store...
- Tue Apr 13, 2021 3:51 pm
- Forum: The Code Dump
- Topic: Simple wxSwitchCtrl class
- Replies: 3
- Views: 55
Re: Simple wxSwitchCtrl class
Thanks for the contribution 
FWIW, as it's essentially a (dual state) wxCheckBox, i would have used the same event for it.

FWIW, as it's essentially a (dual state) wxCheckBox, i would have used the same event for it.
- Tue Apr 13, 2021 5:27 am
- Forum: Compiler / Linking / IDE Related
- Topic: MSW: 3.1.2 + CMake3.19 install link errors (VS2015)
- Replies: 9
- Views: 105
Re: MSW: 3.1.2 + CMake3.19 install link errors (VS2015)
Code: Select all
CMAKE_INSTALL_PREFIX C:/Program Files (x86)/wxWidgets
- Mon Apr 12, 2021 4:34 pm
- Forum: C++ Development
- Topic: Redirection of a process output
- Replies: 8
- Views: 137
Re: Redirection of a process output
But the thing is that wxExecute doesn't handle redirection Really? What about wxProcess::Redirect(), wxProcess::GetInputStream(), wxProcess::GetOutputStream() etc? You need to subclass wxProcess, create an instance of it and pass it to wxExecute. Check the "exec" sample, look for occurrences of "My...
- Sun Apr 11, 2021 10:02 pm
- Forum: C++ Development
- Topic: How to draw only completely visible items in wxScrolledCanvas
- Replies: 5
- Views: 129
Re: How to draw only completely visible items in wxScrolledCanvas
I didn't have time for a deeper look, but the clearing of the background with DrawRectangle() seems to be the problem. If i just add dc.Clear() before or after DoPrepareDC(), the redraw issue goes away.
- Sun Apr 11, 2021 4:11 pm
- Forum: C++ Development
- Topic: How to draw only completely visible items in wxScrolledCanvas
- Replies: 5
- Views: 129
Re: How to draw only completely visible items in wxScrolledCanvas
Can you create a minimal, compilable sample that shows the problem?
- Sun Apr 11, 2021 9:47 am
- Forum: C++ Development
- Topic: How to draw only completely visible items in wxScrolledCanvas
- Replies: 5
- Views: 129
Re: How to draw only completely visible items in wxScrolledCanvas
Try adding the wxFULL_REPAINT_ON_RESIZE window style flag. Despite its name, it sometimes fixed redraw issues in scrolled windows, even when they're happening while scrolling, not resizing.
- Sun Apr 11, 2021 9:45 am
- Forum: C++ Development
- Topic: Stationary background with wxScrolled
- Replies: 5
- Views: 135
Re: Stationary background with wxScrolled
Try adding the wxFULL_REPAINT_ON_RESIZE window style flag. Despite its name, it sometimes fixed redraw issues in scrolled windows, even when they're happening while scrolling, not resizing.
- Sat Apr 10, 2021 8:49 pm
- Forum: C++ Development
- Topic: Retrieve image indices in wxTreeListCtrl
- Replies: 1
- Views: 50
Re: Retrieve image indices in wxTreeListCtrl
I looked into the sources, and it seems there is no way to read these values.
- Fri Apr 09, 2021 3:57 pm
- Forum: C++ Development
- Topic: Capture mouse events from childwindows
- Replies: 5
- Views: 122
Re: Capture mouse events from childwindows
Or do I have to bind to all childwindows? That depends on what you want to do. In most cases you probably want wxWindow::CaptureMouse() https://docs.wxwidgets.org/trunk/classwx_window.html#a5c72c6260a73ef77bb0b1f7ec85fcfef If that's not sufficient for your task, you have to bind to all descendants,...
- Fri Apr 09, 2021 3:49 pm
- Forum: C++ Development
- Topic: Using Matplotlib with wxWidgets C++
- Replies: 20
- Views: 460
- Fri Apr 09, 2021 3:47 pm
- Forum: C++ Development
- Topic: Using Matplotlib with wxWidgets C++
- Replies: 20
- Views: 460
Re: Using Matplotlib with wxWidgets C++
This is really Matplotlib question. If you find a way to write the data as some kind of bitmap, you can dispay it in wxwidgets. According to this post , you can do it with "imsave", but it seems using a tempfile is the only way.
- Fri Apr 09, 2021 9:07 am
- Forum: C++ Development
- Topic: Using Matplotlib with wxWidgets C++
- Replies: 20
- Views: 460
Re: Using Matplotlib with wxWidgets C++
I couldn't find what kind of outputs matplotlib supports, from the sample code i can only see that it can generate a PDF. If it can also create any kind of image/bitmap, you could write a small wrapper class that just takes that image and draws it onto a panel. https://wiki.wxwidgets.org/Drawing_on_...
- Wed Apr 07, 2021 2:21 pm
- Forum: Platform Related Issues
- Topic: Load resources such as images and icons in my .dll project
- Replies: 10
- Views: 233
Re: Load resources such as images and icons in my .dll project
Code: Select all
button ICON "button1.bmp"
Code: Select all
btnMyButton->SetBitmap(wxICON(button1));
Try:
Code: Select all
btnMyButton->SetBitmap(wxICON(button));
- Wed Apr 07, 2021 12:05 pm
- Forum: C++ Development
- Topic: How to handle multiple dataview selections?
- Replies: 5
- Views: 110
Re: How to handle multiple dataview selections?
wxDataViewListCtrl::ItemToRow
https://docs.wxwidgets.org/trunk/classw ... ad30be241f
wxDataViewListCtrl::RowToItem
https://docs.wxwidgets.org/trunk/classw ... ff6b2f7fd5
https://docs.wxwidgets.org/trunk/classw ... ad30be241f
wxDataViewListCtrl::RowToItem
https://docs.wxwidgets.org/trunk/classw ... ff6b2f7fd5