Search found 15811 matches
- Mon Apr 12, 2021 4:34 pm
- Forum: C++ Development
- Topic: Redirection of a process output
- Replies: 7
- Views: 88
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: 121
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: 121
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: 121
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: 129
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: 45
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: 112
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: 435
- Fri Apr 09, 2021 3:47 pm
- Forum: C++ Development
- Topic: Using Matplotlib with wxWidgets C++
- Replies: 20
- Views: 435
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: 435
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: 225
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: 107
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
- Wed Apr 07, 2021 11:23 am
- Forum: C++ Development
- Topic: How to handle multiple dataview selections?
- Replies: 5
- Views: 107
Re: How to handle multiple dataview selections?
From the "dataview" sample, code to delete all seletected items: void MyFrame::DeleteSelectedItems() { wxDataViewItemArray items; int len = m_ctrl[Page_Music]->GetSelections( items ); for( int i = 0; i < len; i ++ ) if (items[i].IsOk()) m_music_model->Delete( items[i] ); }
- Wed Apr 07, 2021 10:16 am
- Forum: C++ Development
- Topic: wxLocale equivalent of _configthreadlocale(_ENABLE_PER_THREAD_LOCALE)
- Replies: 1
- Views: 82
Re: wxLocale equivalent of _configthreadlocale(_ENABLE_PER_THREAD_LOCALE)
Under Windows ::SetThreadLocale() is called to set the locale, so creating another wxLocale instance in the thread should work. But for the other platforms, i don't see any equivalent code in <wxdir>/src/common/intl.cpp If it's only for number conversions, there are a few helper functions in wxStrin...
- Wed Apr 07, 2021 10:07 am
- Forum: C++ Development
- Topic: How to handle multiple dataview selections?
- Replies: 5
- Views: 107
Re: How to handle multiple dataview selections?
Look in the base class, there is wxDataViewCtrl::GetSelections
https://docs.wxwidgets.org/trunk/classw ... b254c41c86
https://docs.wxwidgets.org/trunk/classw ... b254c41c86