Search found 709 matches

by Manolo
Thu Jan 30, 2020 11:32 pm
Forum: C++ Development
Topic: wxGridCellTextEditor::GetValue() nullptr exception
Replies: 3
Views: 90

Re: wxGridCellTextEditor::GetValue() nullptr exception

The editor for a cell is created when it's needed (read: double click on the cell), and deleted when the cell is de-activated (cursor is set to other cell). So, if you call editor->GetValue() it may raise an error. wxGridCellEditor* editor = m_grid->GetCellEditor(...) will give the editor to use whe...
by Manolo
Thu Jan 30, 2020 11:21 pm
Forum: C++ Development
Topic: Any way to catch a click on the wxDVLC cell?
Replies: 3
Views: 98

Re: Any way to catch a click on the wxDVLC cell?

I use my own custom renderer and catch "ActivateCell"
https://docs.wxwidgets.org/trunk/classw ... d803a552fc
by Manolo
Fri Jan 17, 2020 1:39 am
Forum: C++ Development
Topic: WarpPointer question
Replies: 8
Views: 345

Re: WarpPointer question

Zoom around the current mouse position is done like this: a) Calculate the zoom factor from the mouse wheel event. Notice it can be greater or less than one. Multiply the factor for the current window/rectangle/block/whatever sizes. Now you have new horizontal/vertical sizes. b) Get current mouse po...
by Manolo
Fri Jan 17, 2020 1:24 am
Forum: C++ Development
Topic: Best control for the task
Replies: 5
Views: 185

Re: Best control for the task

I agree with PB, the control you need is a wxGrid.
by Manolo
Thu Dec 19, 2019 4:37 pm
Forum: C++ Development
Topic: OpenGL Program Crash on First SwapBuffers() Call
Replies: 7
Views: 192

Re: OpenGL Program Crash on First SwapBuffers() Call

program runs on another Win10 machine with same build number (different video card and motherboard This would point to a video driver mess. Try unistalling AMD (ATI) driver. Does it run with defautl Windows driver?. Clean the Win register, reinstall AMD driver and try again. *cube sample runs *pyra...
by Manolo
Tue Dec 03, 2019 11:55 pm
Forum: Platform Related Issues
Topic: Different looking of wxChoice
Replies: 17
Views: 711

Re: Different looking of wxChoice

There has been some recent bug fixes in sizing some controls under GTK+3. Download the last code directly from "git" and recompile wx.
by Manolo
Mon Dec 02, 2019 4:18 pm
Forum: C++ Development
Topic: wxString spliting syntax
Replies: 7
Views: 228

Re: wxString spliting syntax

mwxString[0].GetValue() == "(" This is wrong. You're trying to compare a string (that inside "") with a wxUniCharRef (returned by GetValue()). More at https://docs.wxwidgets.org/trunk/classwx_string.html "Traps for the unwary" Use ' instead of " mwxString[0].GetValue() == '(' While your code is "ev...
by Manolo
Fri Oct 25, 2019 3:53 pm
Forum: C++ Development
Topic: How to catch unicode text input in wxWidgets like wxTextCtrl on windows?
Replies: 3
Views: 435

Re: How to catch unicode text input in wxWidgets like wxTextCtrl on windows?

wxWindow can receive keyboard input, as wxTextCtrl does. See the keyboard sample. You can have a wxWindow (or one of its derivates) and handle its char-events. Joining chars you get the string. Also handle paste-event, you can get a string in just one event. But you have to draw the text on your own...
by Manolo
Fri Oct 25, 2019 3:41 pm
Forum: Compiler / Linking / IDE Related
Topic: problem with wxGLCanvas
Replies: 11
Views: 1002

Re: problem with wxGLCanvas

As @doublemax told, the "double buffer" feature is provided by the OS, not glut needed. wxWidgtes allows you to set it, please read every class doc from this grup: https://docs.wxwidgets.org/trunk/group__group__class__gl.html Some more info in this post: https://forums.wxwidgets.org/viewtopic.php?f=...
by Manolo
Thu Oct 24, 2019 4:01 pm
Forum: Platform Related Issues
Topic: wxGTK + OpenGL + gtk3 + Display Scaling
Replies: 7
Views: 1053

Re: wxGTK + OpenGL + gtk3 + Display Scaling

Fixed two months ago.
https://github.com/wxWidgets/wxWidgets/ ... 5283137a2f

Can you test it (as the patch uses gtk_widget_get_scale_factor() instead of gdk_monitor_get_scale_factor())?
by Manolo
Tue Oct 22, 2019 4:03 pm
Forum: Platform Related Issues
Topic: wxGTK + OpenGL + gtk3 + Display Scaling
Replies: 7
Views: 1053

Re: wxGTK + OpenGL + gtk3 + Display Scaling

In that ticket #17391 you can read that OpenGL knows nothing about the scale of the display. The best way to go is also told there: use const wxSize sizeInPixels = GetClientSize() * GetContentScaleFactor(); . No need to use GDK_SCALE , which will affect also the normal GUI. Then use that sizeInPixel...
by Manolo
Fri Oct 11, 2019 5:03 pm
Forum: C++ Development
Topic: Using GetSizer and Size Event Handler to resize a drawing
Replies: 3
Views: 330

Re: Using GetSizer and Size Event Handler to resize a drawing

Any GetXXXX function pass some value to your variable; the other direction is SetXXXX. To draw something that fits into a rectangle you first need to know the dimensions of that rectangle. The dimensions (width, height) of the "available" part of a window (the client area, without toolbars, menus, c...
by Manolo
Thu Oct 03, 2019 2:49 pm
Forum: C++ Development
Topic: wxGLCanvas: weird update issue
Replies: 6
Views: 370

Re: wxGLCanvas: weird update issue

Some comments, just to set it clear. The best way to do wxGLCanvas update is to have a wxPaintEvent handler (i.e. void OnPaint(wxPaintEvent& evt) ) in your wxGLCanvas class. This is what @doublemax is asking to be sure. This OnPaint() will be called automatically by the OS when it needs the window t...
by Manolo
Mon Sep 16, 2019 12:52 pm
Forum: C++ Development
Topic: button right align by AddStretchSpacer not work
Replies: 6
Views: 338

Re: button right align by AddStretchSpacer not work

Tell the sizer how to align the buttons using some flag of https://docs.wxwidgets.org/trunk/classwx_sizer.html#wxsizer_flags pSizer_0_0->Add(new wxButton(this, wxID_OK, L"AAA"), 0, wxALIGN_RIGHT); pSizer_0_0->Add(new wxButton(this, wxID_CANCEL, L"BBB"),1, wxALIGN_RIGHT); Notice the "0" I added to th...
by Manolo
Sun Sep 08, 2019 12:50 pm
Forum: C++ Development
Topic: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?
Replies: 8
Views: 367

Re: Q: Is wxEventLoop closest thing to Win32's GetMessage? How does it?

Case 1 The task blocks everything, GUI included, until it's completed. Then code normally. No threads, no message-handling etc. This approach may only be user-friendly if the task finishes in less than a second. Case 2 The task blocks nothing. There are several ways. For example you may call wxYiel...