Questions tagged [wxwidgets]
wxWidgets is a cross-platform GUI framework. It is written in C++ and has bindings for Python, Perl, Ruby, PHP, Erlang and even .Net. It also supports several mobile platforms including Windows Mobile, iPhone SDK and embedded GTK+.
3,975
questions
3
votes
1
answer
76
views
Failed to show `𝑥` (UTF-16 character) in wxWidgets (C++)
I am using wxWidgets with Visual Studio 2022 (C++) to develop Windows application. I wish to display 𝑥 in the window, but as I tried using various fonts with the following code:
std::string ...
0
votes
1
answer
35
views
How to disable a wxTextCtrl Widget in wxWidgets C++?
I'm writing a wxWidgets program in C++. It has several single line wxTextCtrls in it and I need to disable them so the user cannot enter text in them. Later, when a menu item is clicked, I want to ...
0
votes
1
answer
37
views
python - Wx see through window user input data collection
I am creating a multi touch accuracy checking device that indicates where the user should touch the screen. It overlays a semi transparent image over an exe called using subprocess with wx as shown ...
0
votes
1
answer
28
views
CodeBlocks not finding wxWidgets
I'm on PopOS and installed wxWidgets via the terminal when I first got the error error: wx/wxprec.h: No such file or directory as said by the user "oBFusCATed". I did not manually compile ...
1
vote
0
answers
37
views
Windows WxPython open excel file that's already open
I'm trying to read data from an excel file in Windows, but I'd rather not have to close the excel file to do this.
However, when I try to select an excel file that I have open, I get the warning
This ...
1
vote
0
answers
75
views
Is it possible to create a circular wxPanel in wxWidgets
I want to know if it is possible to create a circular wxPanel in wxWidgets. Currently, I know how to draw a circle using the following code :
void Shapes::OnPaint(wxPaintEvent &event)
{
...
-2
votes
0
answers
37
views
I can't get "[]" operators to access "nested" list in C++ [duplicate]
I'm working with a nested for loop that loops over a list that was originally inside a map (hence the it->second) in the code snippet below. Despite SubCategoryList being a list it tells me that it ...
0
votes
1
answer
40
views
How should I use wxLogFormatter to change the logging format?
I need to change the output format to a log file in my wxWidgets application.
For example, now the output to the log file looks like this:
10:13:19: there is wxLogDebug message
I want to add date and ...
0
votes
0
answers
46
views
wxWidgets unexpected executable size
I am using CMakeLists.txt + vcpkg.json + CMakePresets.json + MSVC 2022 to create a wxWidgets application. The hello world application compiles to 4.5MB in Release mode. I inspected the executable in ...
-1
votes
2
answers
71
views
Where is the main function in a wxWidgets application?
I try to use wxWidgets in my C++ project.
As far as I know, for wxWidgets I need to use wxIMPLEMENT_APP(MyAPP );
instead of the main() function.
I don't understand how to write other functions to do ...
0
votes
2
answers
82
views
Can't figure out how to pass arguments to a bind function
After several tries of trying to pass arguments in a scroll event function, It's not working.
I'm making a custom scroll panel and need the bind function to trigger when the user scrolls down, in ...
0
votes
1
answer
45
views
Having trouble iterating over the right children to change their color
I'm looking to make a menu where there are more than one wxStaticTexts and when one of them is clicked it turns black and the rest are/revert back to being grey (if they were clicked before, otherwise ...
1
vote
1
answer
60
views
C++ wxWidgets GetSizeFromText() returns bigger size on high dpi
I have been using wxWidgets 3.1.6 to create a C++ Windows 11 application, which I haven't been having a good experience with so far.
My application has been using absolute positioning for a long time, ...
0
votes
1
answer
42
views
How to get if User pressed Enter wxWidgets
I want to get the Input from a field
wxTextCtrl* upperOnly = new wxTextCtrl(this, wxID_ANY, wxT("Test"),wxPoint(5,260), wxSize(630,30));
and this i want every Time the user Pressed Enter
0
votes
1
answer
36
views
Having trouble setting background of an event with its ID | WxWidgets
I believe I've done something similar in wxPython where I've changed an event by grabbing the Id or object and setting the object's background from there. In WxWidgets I seem to be having trouble ...
0
votes
1
answer
22
views
wxPython: Drawing on top of a GenStaticBitmap
I would like to take a screenshot of my monitor and draw a box on it by clicking and dragging my mouse. In order to listen to mouse events, I use GenStaticBitmap from wx.lib.statbmp instead of just ...
0
votes
1
answer
25
views
wxChoice not visible in wxPanel
I need to add a drop down box to a panel but it doesn't seem to show up when I add it.
WeldProfileDialog::WeldProfileDialog(cMainWindow* parent, wxWindowID id) : wxDialog(parent,id, "Weld Profile ...
0
votes
0
answers
31
views
PNG image handler not found
following piece of code is not able to save a PNG file:
wxBitmap screenshot(screenWidth,screenHeight,24);
...
::wxInitAllImageHandlers();
screenshot.SaveFile(path,wxBITMAP_TYPE_PNG);
Although I added ...
0
votes
0
answers
53
views
vcpkg C++ wxWidgets 3.1.6 , running application has missing dll "pcre2-16.dll"
I have recently upgraded from wxWidgets 3.1.5 to wxWidgets 3.1.6 with vcpkg. My application used to run fine with version 3.1.5. When I try to run my application with wxWidgets 3.1.6 I get a missing ...
-2
votes
2
answers
51
views
How to add the READONLY style to a wxTextCtrl text box in C++
was wondering how to add the REARONLY style to a TextCtrl in C++ for the wxWidgets framework. Im a complete noob to C++ and wxWidgets and couldn't find an comprehensible answer online. All I want to ...
0
votes
1
answer
54
views
wxWidgets wxMessageDialog works well in a secondary thread while a custom dialog doesn't
I am programming using C++ /CLI with wxWidgets on Windows 11.
I'm Also Using .NET threads
When I create a wxMessageDialog in a secondary thread and run ->ShowModal() , it works.
But when I create ...
0
votes
0
answers
30
views
Error with WxWidgets as sub module, missing some dlls
I'm trying to build the hello world application as show on the official website but when i run the application I get the error Process finished with exit code -1073741515 (0xC0000135)
I followed the ...
0
votes
0
answers
39
views
Building wxWidgets using Cmake in a subdirectory
I'm trying to build a project with cmake that includes wxWidgets as a subdirectory similar to the last section in:
https://docs.wxwidgets.org/trunk/overview_cmake.html
The project has the following ...
0
votes
1
answer
34
views
Pass Wx Frame class as a variable to another Class
I am trying to pass a WX frame class to another class. I have three py files which are as follows:
gui_20220510.py - this contains the gui code
import wx
class Frame_Demo(wx.Frame):
def __init__(...
0
votes
1
answer
37
views
transient popup with slider wrong value when mouse is over parent panel using wxPython
OS: Linux (Fedora 35)
Python: 3.10.4
wxPython: 4.1.1 (gtk3, released 2020-11-21)
wxWidgets: 3.1.5 (released 2021-04-14)
Using wxPython, I'm trying to have a PopupTransientWindow show a slider, ...
0
votes
0
answers
39
views
why wxScreenDC get black screen
Does anyone know why wxScreenDC only get black screen when Blit to a wxMemoryDC.
I'm using Debian system with wxWidgets v3.1.5(or v3.1.6)
Same code, replace wxScreenDC with wxWindowDC everything go ...
1
vote
1
answer
52
views
Creating an animation showing a line dropping vertically using wxPython
I wrote a code showing a line dropping vertically using wxPython. The issue Iam facing is when I keep the same y-coordinate (y2=y4 :drawing horizontal line on frame), the line is not visible on the ...
0
votes
0
answers
38
views
wxWidgets 3.1.6, wxAuiNotebook Font Problems
I just upgraded to wxWidgets 3.1.6 and it seems there are loads of fixes and upgrades. However, I ran into the problem of rather small font size for notebook page text.
I am using wxAuiNotebook to ...
0
votes
1
answer
69
views
Error when trying to build Freechart project in wxWidgets 3.1.1, with WX_SHARED=0
I wonder if anyone can help me..
I'm having a problem trying to build 'Freechart' charting widget, downloadable from here:
https://sourceforge.net/projects/wxcode/files/Components/wxFreeChart/
...
0
votes
0
answers
46
views
(wxWidget C++) Save User Input
I am trying to save user input when the user changes a value on a slider and hits enter, or I can have a text box where the user inputs a number, but this is saved as a string in wxWidget which is a ...
0
votes
0
answers
54
views
Can I use wxwidgets within my Win32 API programm
I wanna use wxSVG to render SVG file in my Win32 program. But wxSVG is only used with wxWidgets toolkits. So I wanna know if it's possible to use wxWidgets in my origin Win32 program without change ...
1
vote
0
answers
30
views
which include file has contain "wxEVT_WEBVIEW_LOADED" macro?
erlang 24.3.3 is used.
From the 24.3.3 document, the wx version is 2.1.3.
I have find 2.1.3's wx.hrl and it doesn't contain the wxEVT_WEBVIEW_LOADED and wxEVT_WEBVIEW_ERROR.
But in the doc, it says
...
0
votes
1
answer
85
views
How to get wxWidgets working in Visual Studio 2012
I've got a problem for which I would very much like a solution please:
All I'm trying to do is use wxWidgets in Visual Studio 2012 (in C++), and make it accessible to my code project. That shouldn't ...
0
votes
0
answers
43
views
How to use wx-config in VS code in Windows
I'm trying to use wxWidgets 3.1.6 library in visual studio code.
I'm using Microsoft C/C++ for Visual Studio Code.
The wxWidgets Hello World Example work just fine. When I compile wxAui example from ...
0
votes
1
answer
82
views
wxWidgets not linking using Cmake from VSCode (MSVC)
Problem
I am getting linker errors when building my project. The project has no trouble finding wxWidgets headers. I have looked at the wxWidgets minimal example and recreated it in order to verify ...
0
votes
0
answers
46
views
how to do search in CheckListBox
I want to create a customized dialog like Excel filter fucntion.
when search bar change then below checklistbox will update, and checklistbox can be multiple selection.
And now I have create a dialog, ...
0
votes
1
answer
45
views
wxWidgets and wxPDFDoc crash on init
I am getting a crash on initialisation of my program for no obvious reason that I can see. My callstack is:
1 std::char_traits<wchar_t>::assign char_traits.h 420 ...
2
votes
1
answer
88
views
why does wxDC::GetTextExtent() return the same value for a high DPI display in wxWidgets?
I am trying to scale my application written in c++ with wxWidgets for high DPI displays. I am following the guidelines in the official link. Everythings work fine so far except the return value of ...
0
votes
1
answer
45
views
Prevent title/toolbar inlining on macOS using wxPython
With
tb = myFrame.CreateToolBar()
tb.AddTool(wx.ID_ANY, 'A', wx.Bitmap("plus.png"))
tb.AddStretchableSpace()
tb.AddTool(wx.ID_ANY, 'B', wx.Bitmap("plus.png"))
tb.Realize()
I get
...
0
votes
0
answers
246
views
Real time plotting in c++
I'm trying to figure out which is the best way to render real time plot in c++ (fast data rate):
Retained mode GUI (WxWidgets)
Retained mode GUI + OpenGL
Immediate mode GUI (Imgui)
0
votes
2
answers
82
views
vcpkg wxWidgets CMake linker error with libjpeg.a
I'm trying to use wxWidgets on an arm64 macOS with vcpkg, CMake, and VS Code. Everything is wired up correctly because other vcpkg libraries include, link, and run fine. But, when I try to use ...
2
votes
0
answers
46
views
How to display non-english characters in wx
Is there a way to display non-english characters in buttons and message dialogues?
For example, I need characters like ż, ć, ą, etc. When the button's label is supposed to say "Usuń sekwencje&...
0
votes
1
answer
29
views
wxGrid, GridColLabelWindow mouse capture assertion failed
I am capturing the mouse for GridColLabelWindow but getting an assertion message "!wxMouseCapture::IsInCaptureStack(this) failed. Recapturing the mouse in the same window?" for the following ...
0
votes
1
answer
24
views
SetSizeHints to a frame loaded by wxXmlResource
Right now I'm using wxWidgets msw 3.0.5 on Windows 7 and the xrc file was created with wxFormBuilder 3.10.1
Normally I use something like this to avoid my wxframe be resized smaller than my child ...
0
votes
2
answers
48
views
Cannot bind wxCommandEvent to a handler, invalid conversion from wxCommandEvent* to wxEvent*
I ran into a strange issue when using wxWidgets 3.1.5. Trying to bind wxCommandEvent to a handler fails with the following compiliation error:
/usr/local/include/wx-3.1/wx/event.h:423:29: error: ...
0
votes
0
answers
46
views
What can cause an LNK2019 Error when building a project?
I built my program with wxWidgets Library and OpenCV. I set up my project by first including wxWidgets property file as follows:
Property manager where property file was set:
I then set OpenCV by ...
0
votes
1
answer
55
views
wxWidgets Panel not Receiving Mouse Events
I am having trouble capturing and handling mouse events within a panel.
Binding mouse events to my main window frame works as expected. However, when I bind events to a child panel, they successfully ...
0
votes
1
answer
38
views
wxPython scrolledwindow in a notebook does not scroll
I want to have scrolled windows on tabs of a notebook. If the window is too small the contents should be scrollable. Everything is laid out correctly if the window is big enough. It also looks ...
0
votes
0
answers
87
views
Undefined references to std::streambuf methods when building wxWidgets with Clang on Windows
I've been trying to build my app (with wxWidgets) using Clang (with MSVC libraries). But I keep getting these linking errors. I used to build the app using minGW and it worked just fine.
These are the ...
1
vote
2
answers
71
views
How do I get rid of the default macOS menu items in wxWidgets?
"Toggle Sidebar" is the only item I have added, how do I remove the other items which I don't really need? I'm stuck
I'm on macOS 12.2 with wxWidgets v3.1.5
here's the code I used to add the ...