Search found 130 matches

by doublemax@work
Tue Sep 14, 2021 3:15 pm
Forum: C++ Development
Topic: wxDataViewListCtrl::AppendItem: Freeing the data
Replies: 18
Views: 359

Re: wxDataViewListCtrl::AppendItem: Freeing the data

Interesting, i didn't know something like wxDataViewModelNotifier existed. This looks like it might work. Is there a way to get from the wxDataViewItem to the associated data? wxDataViewListCtrl::GetItemData https://docs.wxwidgets.org/trunk/classwx_data_view_list_ctrl.html#ad866a1c2896468cfd0c19e154...
by doublemax@work
Tue Sep 14, 2021 1:52 pm
Forum: Compiler / Linking / IDE Related
Topic: Any .rc resource script Editor recommendation for non-VS IDE?
Replies: 4
Views: 261

Re: Any .rc resource script Editor recommendation for non-VS IDE?

tomay3000 wrote:
Mon Sep 13, 2021 11:49 pm
I want to edit an .rc file to embed some resources like ICO, CUR, PNG, JPEG in the EXE file under windows using Code::Blocks.
This is trivial to do with a text editor. I don't think you need a dedicated resource editor for that.
by doublemax@work
Tue Sep 14, 2021 1:48 pm
Forum: C++ Development
Topic: wxDataViewListCtrl::AppendItem: Freeing the data
Replies: 18
Views: 359

Re: wxDataViewListCtrl::AppendItem: Freeing the data

I don't think there is any way to achieve this without access to the model. Unless you have to allocate and free lots of memory during the lifetime of your application i would handle this on user side (= in your app). Just have a hash with item-id as key and memory pointer as value, and free the mem...
by doublemax@work
Tue Sep 07, 2021 10:09 am
Forum: C++ Development
Topic: wxStyledTextCtrl::Remove - wrong last position in Cyrillic text
Replies: 6
Views: 477

Re: wxStyledTextCtrl::Remove - wrong last position in Cyrillic text

Can you check if m_styledTextCtrl->GetSelectedText().Len() returns the same value as m_styledTextCtrl->GetLastPosition()?
by doublemax@work
Mon Sep 06, 2021 8:51 am
Forum: C++ Development
Topic: wxGrid not painting all the rows with custom row height
Replies: 3
Views: 435

Re: wxGrid not painting all the rows with custom row height

Please try to reproduce it in the "griddemo" sample that comes with wxWidgets by adding a SetDefaultRowSize() call. Are you using a display with font-scaling > 100%? If yes, try if the error disappears at 100%. If the error is related to font-scaling, please open a bug report at http://trac.wxwidget...
by doublemax@work
Wed Sep 01, 2021 2:13 pm
Forum: C++ Development
Topic: wxFileConfig error with encoding with BOM
Replies: 5
Views: 498

Re: wxFileConfig error with encoding with BOM

Is there really a CR/LF after the BOM? If yes, try removing it.

I just loaded one of my INI files in Notepad++ and saved it with BOM. It still loaded without problem, the only issue was that the BOM was gone after the INI file was saved again.
by doublemax@work
Wed Sep 01, 2021 10:08 am
Forum: C++ Development
Topic: Segmentation fault during changing of cell color of wxGrid
Replies: 3
Views: 629

Re: Segmentation fault during changing of cell color of wxGrid

GUI operations must be executed from the main thread only. If you don't follow that, you're out of warranty :) If we put the UI update only on main thread, interactions with the UI (Such as dragging a frame inside the application) become choppy and unresponsive. What exactly is going on in your app ...
by doublemax@work
Wed Sep 01, 2021 10:05 am
Forum: Platform Related Issues
Topic: 4K resolution slow performance in drawing and interaction on Mac
Replies: 2
Views: 587

Re: 4K resolution slow performance in drawing and interaction on Mac

We noticed that on resolutions above 1920x1080 on Mac OS Is it really the resolution that matters or is it the switch between retina and not-retina display? If you can reproduce the issue in a small sample (ideally based on one of the wxWidgets samples), open a bug report at https://trac.wxwidgets....
by doublemax@work
Wed Sep 01, 2021 10:03 am
Forum: Platform Related Issues
Topic: Evt_char_hook and evt_char not emitting events in wxFileDialog on Mac
Replies: 2
Views: 406

Re: Evt_char_hook and evt_char not emitting events in wxFileDialog on Mac

wxFileDialog is just a wrapper around the respective native control on each platform, so it's possible that "normal" wxWidgets events don't work.

How does this work in other OSX applications?
by doublemax@work
Tue Aug 31, 2021 2:36 pm
Forum: C++ Development
Topic: Saving wxGLCanvas with Aplha to file
Replies: 2
Views: 394

Re: Saving wxGLCanvas with Aplha to file

I'm surprised a wxPaintDC works as a source dc at all. But i think it's too late to try to get the alpha information from there (if it's possible at all).

I would try using glReadPixels to get the buffer directly from OpenGL.
by doublemax@work
Tue Aug 31, 2021 2:27 pm
Forum: C++ Development
Topic: wxBitMap error
Replies: 6
Views: 681

Re: wxBitMap error

Code: Select all

wxImage iconPng(projectPath + "/resource", wxBITMAP_TYPE_PNG);
Icon filename is missing now.

Try with a hard-coded, absolute path first. If that works, you know where the problem is.
by doublemax@work
Mon Aug 30, 2021 9:09 am
Forum: Component Writing
Topic: Keyboard only wxFileDialog
Replies: 9
Views: 1414

Re: Keyboard only wxFileDialog

Try adding a wxPanel to the dialog, and call SetFocus() on it in the dialog constructor.
by doublemax@work
Mon Aug 23, 2021 2:08 pm
Forum: C++ Development
Topic: Bind OnClose?
Replies: 3
Views: 845

Re: Bind OnClose?

TheGates wrote:
Mon Aug 23, 2021 2:00 pm
Oh I thought I had to do MyFrame->Bind but that didnt work
ok thanks
The code i posted assumes that it's inside a method of the frame, usually the constructor. If you have a pointer to the frame, ->Bind should work, too.
by doublemax@work
Mon Aug 23, 2021 1:58 pm
Forum: C++ Development
Topic: Bind OnClose?
Replies: 3
Views: 845

Re: Bind OnClose?

Should work just like any other event.

Code: Select all

Bind(wxEVT_CLOSE_WINDOW, &MyFrame::OnCloseWindow, this);
by doublemax@work
Wed Aug 18, 2021 8:19 am
Forum: Compiler / Linking / IDE Related
Topic: Compile error on release build on XCode 8.3 on 3.1.5
Replies: 3
Views: 964

Re: Compile error on release build on XCode 8.3 on 3.1.5

Can you build and run the samples that comes with wxWidgets?