Search found 15893 matches

by doublemax
Sun May 09, 2021 4:21 pm
Forum: C++ Development
Topic: MDI window event queue process-order problem
Replies: 1
Views: 47

Re: MDI window event queue process-order problem

But when I post the wxEvent with wxPostEvent function, MDI Child got the event before MDI Parent could get it. AFAIK the event should process from parent to child with event queue message system That shouldn't happen at all. Events only propagate upwards (to parent), never down (to children). What ...
by doublemax
Sun May 09, 2021 9:12 am
Forum: C++ Development
Topic: Set the color of .xbm stipple brush
Replies: 2
Views: 53

Re: Set the color of .xbm stipple brush

Usually the brush itself defines the colors. Try experimenting with wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE:
https://docs.wxwidgets.org/trunk/brush_ ... 12dfd367ef
by doublemax
Sun May 09, 2021 9:08 am
Forum: C++ Development
Topic: wxArtProvider and Translation
Replies: 9
Views: 273

Re: wxArtProvider and Translation

Assert messages usually don't lie, I'm pretty sure the problem lies within your wxLocale initialization. Did you trace through the init code you posted a while ago and does it actually run to the end? I assume mLocale is a smart pointer? Just for a test, try using a normal pointer, or just make the ...
by doublemax
Fri May 07, 2021 12:20 pm
Forum: C++ Development
Topic: Pass dc.DrawLine parameters in main.cpp file?
Replies: 8
Views: 433

Re: Pass dc.DrawLine parameters in main.cpp file?

Instead of the member variables m_x1 to m_y2, you need a container class that can store multiple point pairs. Add a new method to Line(), e.g. void AddLine( x1, y2, x2, y2 ); Append this point pair to the container. Change the drawing code so that it iterates over all elements in the container and d...
by doublemax
Thu May 06, 2021 2:23 pm
Forum: C++ Development
Topic: How Do I Append Column to wxDataViewListCtrl?
Replies: 8
Views: 233

Re: How Do I Append Column to wxDataViewListCtrl?

I'm having difficulty getting a wxDataViewColumn from EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK. For instance, when I right-click the column header, and it triggers the event, what if I want to delete the column? How do I get the specific wxDataViewColumn pointer from the event? wxEVT_DATAVIEW_COLUMN_...
by doublemax
Thu May 06, 2021 8:54 am
Forum: C++ Development
Topic: Layout using sizer not function as expected
Replies: 3
Views: 130

Re: Layout using sizer not function as expected

quanzhuo wrote:
Thu May 06, 2021 8:38 am
So, as you said, the bug has existed for a long time ?
Will the commutity update the official sample demo project ?
No, it's a new bug, your code still worked in 3.1.4

I opened a bug report here: https://trac.wxwidgets.org/ticket/19170
by doublemax
Thu May 06, 2021 8:00 am
Forum: C++ Development
Topic: Layout using sizer not function as expected
Replies: 3
Views: 130

Re: Layout using sizer not function as expected

That code used to work until 3.1.4, so it's probably a bug.

Instead of

Code: Select all

sizer->SetSizeHints(this);
use this for now (this is what SetSizeHints() used to do):

Code: Select all

const wxSize clientSize = sizer->ComputeFittingClientSize(this);
this->SetMinClientSize(clientSize);
this->SetClientSize(clientSize);
by doublemax
Wed May 05, 2021 10:54 pm
Forum: C++ Development
Topic: Pass dc.DrawLine parameters in main.cpp file?
Replies: 8
Views: 433

Re: Pass dc.DrawLine parameters in main.cpp file?

You can't just draw something on a window once and expect it to stay there. The way it works is that the paint event handler needs to redraw everything each time a paint event is received. What you have to do is to add a method to the "Line" class, which receives all the information the paint event ...
by doublemax
Wed May 05, 2021 10:22 pm
Forum: C++ Development
Topic: How Do I Append Column to wxDataViewListCtrl?
Replies: 8
Views: 233

Re: How Do I Append Column to wxDataViewListCtrl?

So is this your post? https://groups.google.com/g/wx-users/c/313ouk4R8HU

Would be quite a coincidence if two different people have exactly the same problem at the same time.
by doublemax
Wed May 05, 2021 10:17 pm
Forum: C++ Development
Topic: How to Hide a wxFrame using "X" (Close Window) button
Replies: 5
Views: 162

Re: How to Hide a wxFrame using "X" (Close Window) button

ONEEYEMAN wrote:
Wed May 05, 2021 8:20 pm
Most likely this will never going to happen for historic purposes...
Vadim has more powerful solutions in mind: https://groups.google.com/g/wx-users/c/ ... 7rCZGkBgAJ
by doublemax
Wed May 05, 2021 5:36 pm
Forum: C++ Development
Topic: How Do I Append Column to wxDataViewListCtrl?
Replies: 8
Views: 233

Re: How Do I Append Column to wxDataViewListCtrl?

The assert message is pretty clear. If you add another column, you must make sure that the control has data for it. For all lines, including the ones that are already there.
by doublemax
Wed May 05, 2021 5:23 pm
Forum: C++ Development
Topic: How to Hide a wxFrame using "X" (Close Window) button
Replies: 5
Views: 162

Re: How to Hide a wxFrame using "X" (Close Window) button

Code: Select all

event.Skip ();
Remove this. If you call event.Skip(), it means that the default event handler gets executed, too. And the default close event handler for a wxFrame destroys it.

The name of the Skip() method is not very clear, imagine it to be ContinueProcessing().
by doublemax
Wed May 05, 2021 5:17 pm
Forum: C++ Development
Topic: Pass dc.DrawLine parameters in main.cpp file?
Replies: 8
Views: 433

Re: Pass dc.DrawLine parameters in main.cpp file?

This is very, very basic C++ knowledge. If you can't do this, you'll have a hard time with wxWidgets. main.cpp #include "main.h" #include "line.h" IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { Line *line = new Line(wxT("Line"), 10, 10, 100, 100); line->Show(true); return true; } line.h #include <wx/wx...
by doublemax
Wed May 05, 2021 2:35 pm
Forum: C++ Development
Topic: Pass dc.DrawLine parameters in main.cpp file?
Replies: 8
Views: 433

Re: Pass dc.DrawLine parameters in main.cpp file?

You can add parameters to the "Line" constructor and pass any values. If you store them in member variables of "Line", the paint event handler can access them.
by doublemax
Wed May 05, 2021 11:44 am
Forum: C++ Development
Topic: Use wxAnimationCtrl in wxDataViewCtrl
Replies: 2
Views: 101

Re: Use wxAnimationCtrl in wxDataViewCtrl

I don't think wxAnimationCtrl is going to work, as the cells of a wxDVC are not individual windows, so placing the wxAnimationCtrl might be difficult. I think you need a custom renderer for this. - use wxAnimation to load the animation, this also gives you access to each frame as wxImage However, i ...