Search found 13 matches

by Glitch
Mon Apr 27, 2020 1:11 pm
Forum: C++ Development
Topic: wxStaticBoxSizer and space between label and frame.
Replies: 1
Views: 371

wxStaticBoxSizer and space between label and frame.

I'd like to have more space between the label of a wxStaticBoxSizer and the frame it draws. I tried by adding a space character as the first and last characters of the labels, but the last one got always "trimmed". There's a way to avoid that? Or There's a method to set the distance betwee...
by Glitch
Thu Apr 23, 2020 8:34 am
Forum: Component Writing
Topic: wxBufferedPaintDC, wxGraphicContext, and flickering
Replies: 3
Views: 16399

Re: wxBufferedPaintDC, wxGraphicContext, and flickering

I would change the wxActiveArea background style to wxBG_STYLE_PAINT, see https://docs.wxwidgets.org/trunk/classwx_window.html#af14f8fd2ed2d30a9bbb5d4f9fd6594ec Thanks! I missed this. :oops: There is probably more issues ... pls tell me any issue or possible optimization you see. I'm willing to lea...
by Glitch
Wed Apr 22, 2020 5:19 pm
Forum: Component Writing
Topic: wxBufferedPaintDC, wxGraphicContext, and flickering
Replies: 3
Views: 16399

wxBufferedPaintDC, wxGraphicContext, and flickering

I thought that the wxBufferedPaintDC was the right thing to use to avoid flickering. Instead my sample flickers. What have i done wrong? (the code should compile, despite it seems long, i think the only relevant part are the OnPaint and the DoDraw functions in the wxActiveArea.cpp file). TEXT_wxAA.c...
by Glitch
Wed Apr 22, 2020 3:21 pm
Forum: Component Writing
Topic: wxPanel derived component: asking help for problems and tips
Replies: 11
Views: 19721

Re: wxPanel derived component: asking help for problems and tips

My problem is that i don't know WHEN do the recursion: as my component is like a wxPanel, the user can add childrens whenever he wants. How can I ("me" being my component) be aware that there's a new child component so i can catch the event i want from him? That could be tricky. Can you d...
by Glitch
Wed Apr 22, 2020 9:48 am
Forum: Component Writing
Topic: wxPanel derived component: asking help for problems and tips
Replies: 11
Views: 19721

Re: wxPanel derived component: asking help for problems and tips

1) How can my wxActiveArea get the mouse click even if it contains other components? if in the example i click on the label the ActiveArea does'nt react to the mousedown, while i want it ALWAYS get the event no matter what's the child component under the mouse. There is no easy way to do this. You ...
by Glitch
Wed Apr 22, 2020 9:25 am
Forum: Component Writing
Topic: wxPanel derived component: asking help for problems and tips
Replies: 11
Views: 19721

Re: wxPanel derived component: asking help for problems and tips

I'm sorry, i messed up things and got the wrong conclusion, so i posed the wrong question :oops: . Pls let me rewrite part of my previous post and ask the new question, saying that "this" is the wxActiveArea class, derived from wxPanel, i'm writing. (also changed some name so this should b...
by Glitch
Tue Apr 21, 2020 4:50 pm
Forum: Component Writing
Topic: wxPanel derived component: asking help for problems and tips
Replies: 11
Views: 19721

Re: wxPanel derived component: asking help for problems and tips

Should i use a static timer (like in the "animate.cpp" component)? wxtimer m_staticTimer; m_staticTimer.SetOwner(this); or a dynamic one as said here ? wxtimer* m_DynamicTimer ; m_DynamicTimer = new wxTimer(); In the latter case, should i "wxdelete" it in the destructor of my cla...
by Glitch
Sun Apr 19, 2020 5:22 pm
Forum: Component Writing
Topic: wxPanel derived component: asking help for problems and tips
Replies: 11
Views: 19721

Re: wxPanel derived component: asking help for problems and tips

You need to all event.Skip() in the OnSize handler, otherwise the default behavior which handles the sizer layout is not executed. Damn! Thanks. It may be a language issue but i still read "skip" as "don't look at this event anymore" :oops: 2nd problem: if i "connect" ...
by Glitch
Sun Apr 19, 2020 2:50 pm
Forum: Component Writing
Topic: wxPanel derived component: asking help for problems and tips
Replies: 11
Views: 19721

wxPanel derived component: asking help for problems and tips

I'm buildin a component called "wxActiveArea". I want it to act like a wxPanel, but with an animated frame that "glows" when the mouse "press" on it. I'll copy all the code at the end of the post. I'm at the beginning of it and i already have problems: wxAArea.png The u...
by Glitch
Mon Mar 30, 2020 10:35 pm
Forum: Compiler / Linking / IDE Related
Topic: Win7: compiled wxWidgets 3.1.3, cannot build "minimal" sample.
Replies: 11
Views: 2148

Re: Win7: compiled wxWidgets 3.1.3, cannot build "minimal" sample.

What version did you downloaded? Where from? i've downloaded another version from https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version6/gcc-6.3.0/, the specific file is https://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version6/gcc-6.3.0/gcc-core-6.3.0-1-mingw32-bin.tar.xz/...
by Glitch
Mon Mar 30, 2020 4:06 pm
Forum: Compiler / Linking / IDE Related
Topic: Win7: compiled wxWidgets 3.1.3, cannot build "minimal" sample.
Replies: 11
Views: 2148

Re: Win7: compiled wxWidgets 3.1.3, cannot build "minimal" sample.

Thanks to all. I've cleaned everything (the MinGW get setup linked by PB, the old TDM one which i can't remember why it was there, etc. The only gcc related files i have are in one android SDK folder (which is'nt in any path/variable) and in a MAME source folder but they're on another disk. I am not...
by Glitch
Fri Mar 27, 2020 6:41 pm
Forum: Compiler / Linking / IDE Related
Topic: Win7: compiled wxWidgets 3.1.3, cannot build "minimal" sample.
Replies: 11
Views: 2148

Re: Win7: compiled wxWidgets 3.1.3, cannot build "minimal" sample.

Did you verify that wxWidgets built successfully? Is file build.cfg in your WXWIN/lib/gcc_libREL_9201/mswu folder? Yup, it's there: C:\SVILUPPO\wxWidgets-3.1.3\samples\minimal>dir %WX_LIBS% Il volume nell'unità C è 1TBWD-1-WIN7 64 Numero di serie del volume: A26D-1E3B Directory di C:\SVILUPPO\wxWid...
by Glitch
Fri Mar 27, 2020 11:31 am
Forum: Compiler / Linking / IDE Related
Topic: Win7: compiled wxWidgets 3.1.3, cannot build "minimal" sample.
Replies: 11
Views: 2148

Win7: compiled wxWidgets 3.1.3, cannot build "minimal" sample.

Hello. I followed the instructions linked in this thread: https://forums.wxwidgets.org/viewtopic.php?f=19&t=46125 for compiling the Widgets (i don't plan to use Code::blocks, so I have just followed the compiling part), and at the end it worked (despite a lot of warnings about "implicitly-d...