Search found 15815 matches

by doublemax
Wed Apr 14, 2021 5:41 am
Forum: C++ Development
Topic: How to change style of scrollbar
Replies: 10
Views: 2319

Re: How to change style of scrollbar

My suggestion went only as far as creating a custom wxScrollBar, a separate control, which would be sufficient if your scrolled window was 100% custrom drawn. You'd only have to handle virtual size and scroll position in the drawing code. If however, you wanted a complete wxScrollWindow implementati...
by doublemax
Tue Apr 13, 2021 5:23 pm
Forum: C++ Development
Topic: ClientData mysery
Replies: 1
Views: 36

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...
by doublemax
Tue Apr 13, 2021 3:51 pm
Forum: The Code Dump
Topic: Simple wxSwitchCtrl class
Replies: 4
Views: 67

Re: Simple wxSwitchCtrl class

Thanks for the contribution =D>

FWIW, as it's essentially a (dual state) wxCheckBox, i would have used the same event for it.
by doublemax
Tue Apr 13, 2021 5:27 am
Forum: Compiler / Linking / IDE Related
Topic: MSW: 3.1.2 + CMake3.19 install link errors (VS2015) (Edited: actually FindwxWidgets.cmake mostly)
Replies: 12
Views: 139

Re: MSW: 3.1.2 + CMake3.19 install link errors (VS2015)

Code: Select all

CMAKE_INSTALL_PREFIX C:/Program Files (x86)/wxWidgets
I would suspect that the space in the path causes trouble.
by doublemax
Mon Apr 12, 2021 4:34 pm
Forum: C++ Development
Topic: Redirection of a process output
Replies: 8
Views: 138

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...
by doublemax
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.
by doublemax
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?
by doublemax
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.
by doublemax
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.
by doublemax
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.
by doublemax
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,...
by doublemax
Fri Apr 09, 2021 3:49 pm
Forum: C++ Development
Topic: Using Matplotlib with wxWidgets C++
Replies: 20
Views: 465

Re: Using Matplotlib with wxWidgets C++

hinet wrote:
Fri Apr 09, 2021 3:45 pm
In python, I am using this code to plot to auinotebook page:
how I could do this using C++?
Does the C++ wrapper have an equivalent to "FigureCanvas"? That that's probably the class you need.
by doublemax
Fri Apr 09, 2021 3:47 pm
Forum: C++ Development
Topic: Using Matplotlib with wxWidgets C++
Replies: 20
Views: 465

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.
by doublemax
Fri Apr 09, 2021 9:07 am
Forum: C++ Development
Topic: Using Matplotlib with wxWidgets C++
Replies: 20
Views: 465

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_...
by doublemax
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));
Is this from real code?

Try:

Code: Select all

btnMyButton->SetBitmap(wxICON(button));