Search found 144 matches

by Tapsa
Tue Sep 08, 2015 10:59 am
Forum: C++ Development
Topic: How to connect wxThread events?
Replies: 6
Views: 822

How to connect wxThread events?

I don't want to use macros for my wxThread, so how do I connect the actions using Connect? It seems that I need to connect OnThreadUpdate, OnThreadCompletion and OnClose. I can only find wxEVT_THREAD, but nothing like wxEVT_THREAD_UPDATE or wxEVT_THREAD_CLOSE. Loading JPEG image data can take long t...
by Tapsa
Wed Aug 12, 2015 9:35 am
Forum: C++ Development
Topic: What is the correct way to get wxPanel visible size?
Replies: 9
Views: 1968

Re: What is the correct way to get wxPanel visible size?

Which is why we can let this case rest in peace. I can not do a minimal sample of this within minutes.
Obviously it is not necessarily an error withing wxWidgets, but rather I have been using wxWidgets in a way that was never meant to be.
by Tapsa
Wed Aug 12, 2015 7:54 am
Forum: C++ Development
Topic: What is the correct way to get wxPanel visible size?
Replies: 9
Views: 1968

Re: What is the correct way to get wxPanel visible size?

It's okay. Instead of taking 1 hour to make minimal sample, I will move my graphics view to separate window, which seems better for my use. If you want to fix wxWidgets issues you should compile my program and even try to port it to wxWidgets 3.0.2 from 2.8.12. There are so many issues (when upgradi...
by Tapsa
Wed Aug 12, 2015 7:12 am
Forum: C++ Development
Topic: What is the correct way to get wxPanel visible size?
Replies: 9
Views: 1968

Re: What is the correct way to get wxPanel visible size?

I'm sorry to say, but I tried your suggestions before I came here to ask this. I think there is something else broken. wxWidgets basically allows my GUI code to result in broken behavior, without telling me where the error is.
by Tapsa
Tue Aug 11, 2015 11:04 am
Forum: C++ Development
Topic: How to disable label editing in wxDataViewTreeCtrl?
Replies: 2
Views: 319

Re: How to disable label editing in wxDataViewTreeCtrl?

All right. I'll have a look at that.
by Tapsa
Tue Aug 11, 2015 8:38 am
Forum: C++ Development
Topic: How to disable label editing in wxDataViewTreeCtrl?
Replies: 2
Views: 319

How to disable label editing in wxDataViewTreeCtrl?

I don't want users to edit the labels in my custom tree view control.
And if possible, can I get rid of the dotted focused item rectangle?
I'm also wondering about the performance, if there are over 10 000 items in the tree view.
Is wxDataViewTreeCtrl virtual, like wxListCtrl using wxLC_VIRTUAL?
by Tapsa
Thu Aug 06, 2015 9:15 pm
Forum: C++ Development
Topic: Invalid static cast when connecting wxEVT_MOUSEWHEEL
Replies: 3
Views: 675

Re: Invalid static cast when connecting wxEVT_MOUSEWHEEL

It is just a basic class. I thought I don't need to derive it since it is a piece of code that kinda belongs to my wxFrame class.
Perhaps I should move these there?
by Tapsa
Thu Aug 06, 2015 8:50 pm
Forum: C++ Development
Topic: Invalid static cast when connecting wxEVT_MOUSEWHEEL
Replies: 3
Views: 675

Invalid static cast when connecting wxEVT_MOUSEWHEEL

Why is this giving me compiler error of invalid static cast? I want to know how to properly link mouse wheel events using connects. C:\Users\Tapsa\AGE\/AGE_FramePieces.h: In member function 'void AGE_AreaTT84::CreateControls(wxFrame*, int, wxScrolledWindow*&, const wxString&)': C:\Users\Tapsa\AGE\/A...
by Tapsa
Thu Aug 06, 2015 1:18 pm
Forum: C++ Development
Topic: layout management
Replies: 9
Views: 1852

Re: layout management

That would be making a minimal sample then. My program is too complex around this. I can try to look up all related code pieces though. It will be few "pages" then.
by Tapsa
Thu Aug 06, 2015 1:15 pm
Forum: C++ Development
Topic: Unable to bind idle event in kill focus
Replies: 2
Views: 398

Re: Unable to bind idle event in kill focus

Yes, that will do.

EDIT: When incorrect input was given to the text control, it shows message dialog, which just keeps popping back and SetFocus() fails...
wxWidgets 3 really hates my project.
by Tapsa
Thu Aug 06, 2015 12:57 pm
Forum: C++ Development
Topic: layout management
Replies: 9
Views: 1852

Re: layout management

I am experimenting with wxWrapSizer. The boxes do align as expected, but once a box has moved one row up, it will never descend back down, even when my window doesn't have enough space for one row. This happens with the default constructor of wxWrapSizer. I add a bunch of derived text controls and c...
by Tapsa
Thu Aug 06, 2015 10:47 am
Forum: C++ Development
Topic: Unable to bind idle event in kill focus
Replies: 2
Views: 398

Unable to bind idle event in kill focus

I successfully binded idle events in my wxTextCtrl derived kill focus handler, but it is not happening in my frame. Why is that? void AGE_Frame::OnTerrainCountChange(wxFocusEvent &event) { event.Skip(); ((AGETextCtrl*)event.GetEventObject())->Bind(wxEVT_IDLE, &AGE_Frame::validateTerrainCountChange, ...
by Tapsa
Wed Aug 05, 2015 9:16 pm
Forum: C++ Development
Topic: How to disable wxOwnerDrawnComboBox mouse hover scroll?
Replies: 0
Views: 1998

How to disable wxOwnerDrawnComboBox mouse hover scroll?

Whenever I hover my mouse over wxOwnerDrawnComboBox and try to scroll wxScrolledWindow, the combo box selection gets changed instead of scrolling the window. How can I stop this? My class derived from wxOwnerDrawnComboBox uses bind. Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &ComboBox_Plus1::OnUpdate, th...
by Tapsa
Tue Aug 04, 2015 1:48 pm
Forum: C++ Development
Topic: What is the correct way to get wxPanel visible size?
Replies: 9
Views: 1968

Re: What is the correct way to get wxPanel visible size?

I do connect the paint event to wxFrame using this:

Code: Select all

Graphics_SLP_Image->Connect(Graphics_SLP_Image->GetId(), wxEVT_PAINT, wxPaintEventHandler(AGE_Frame::OnDrawGraphicSLP), NULL, this);
"this" is the wxFrame.
by Tapsa
Tue Aug 04, 2015 12:34 pm
Forum: C++ Development
Topic: What is the correct way to get wxPanel visible size?
Replies: 9
Views: 1968

What is the correct way to get wxPanel visible size?

I have two wxPanels, whose visible width and height I need to get, but both GetSize() and GetClientSize() return false sizes. GetSize() from wxBufferedPaintDC also returns false size. I want to center my wxBitmap to the wxPanel, but without real sizes that's impossible. I have not made any scaling f...