Search found 38 matches

by bertolino
Sun Oct 28, 2018 8:12 am
Forum: C++ Development
Topic: How to catch a left click on a wxSlider thumb
Replies: 8
Views: 282

Re: How to catch a left click on a wxSlider thumb

Thanks for the explanation doublemax.
by bertolino
Sat Oct 27, 2018 12:31 pm
Forum: C++ Development
Topic: How to catch a left click on a wxSlider thumb
Replies: 8
Views: 282

Re: How to catch a left click on a wxSlider thumb

Just to confirm that as Kvaz1r stated, the solution with Bind works well.
Of course, two methods are necessary to catch both
wxCommandEvent and wxMouseEvent.
Moral of the story: don't use event tables ;-)
Many thanks for the helps,

Pascal
by bertolino
Sat Oct 27, 2018 11:08 am
Forum: C++ Development
Topic: How to catch a left click on a wxSlider thumb
Replies: 8
Views: 282

Re: How to catch a left click on a wxSlider thumb

Hello Kvaz1r,

Many thanks for your valuable help and piece of code.
I'm going to replace the macro with a call to Bind.
Then I 'll just have to adapt the code to manage my slider range.
Many thanks again for your time,

Pascal
by bertolino
Sat Oct 27, 2018 10:52 am
Forum: C++ Development
Topic: How to catch a left click on a wxSlider thumb
Replies: 8
Views: 282

Re: How to catch a left click on a wxSlider thumb

I have double-ckecked and still have the same issue. To be more precise: I have several sliders, so I use the range macro (this could be the problem): EVT_COMMAND_RANGE(ID_SLIDER, ID_SLIDER + MAX_PARAM_COUNT, wxEVT_LEFT_DOWN, Effects::OnSlider) I've tried the 2 following OnSlider implementations: (1...
by bertolino
Sat Oct 27, 2018 9:24 am
Forum: C++ Development
Topic: How to catch a left click on a wxSlider thumb
Replies: 8
Views: 282

How to catch a left click on a wxSlider thumb

Hi all,

I'd like to detect a left mouse click on a wxSlider thumb (hence the slider value is not changed).
But there is no counterpart to wxEVT_SCROLL_THUMBRELEASE and mouse events are not available
for a wxSlider.
Any help will be welcome.

Regards,
Pascal
by bertolino
Sat Aug 04, 2018 8:02 pm
Forum: C++ Development
Topic: Transparent brush with wxGraphicsContext
Replies: 1
Views: 196

Re: Transparent brush with wxGraphicsContext

I kind of solved my issue. The fact is that my bitmap was not managing transparency (i.e. the alpha channel). So, I tried to initialize it from a PNG file (that manages transparency) and the code works great. I did it with: bitmap= wxXmlResource::Get()->LoadBitmap(wxT("bitmap_in_png_file")); Now I j...
by bertolino
Sat Aug 04, 2018 5:44 pm
Forum: C++ Development
Topic: Transparent brush with wxGraphicsContext
Replies: 1
Views: 196

Transparent brush with wxGraphicsContext

Hello, I'm using a wxGraphicsContext to make some anti-aliased drawing in a bitmap. I want to draw a kind of donut with the hole and the outside transparent. All I can have is a donut with a black hole and a black outside. :-( Here is my code (obviously, using the transparent brush is not the thing ...
by bertolino
Fri Jul 20, 2018 7:42 pm
Forum: Component Writing
Topic: Question about skinned wxMessageBox
Replies: 7
Views: 1137

Re: Question about skinned wxMessageBox

Wow! I missed that (but you didn't!).
Only 2 lines to change and it works great!
Doublemax, you're the best and saved my evening.
I am very grateful for your valuable help.
Have a very good weekend!

Pascal
by bertolino
Fri Jul 20, 2018 5:59 pm
Forum: Component Writing
Topic: Question about skinned wxMessageBox
Replies: 7
Views: 1137

Re: Question about skinned wxMessageBox

Thanks for your advice that offers a solution but that doesn't fully answer my expectation: Actually, until now I'm used to call wxMessageBox like this: wxMessageBox(_("bla bla")), i.e, with just one parameter and the message box is always well centered. I'd like to keep on doing the same with myMes...
by bertolino
Fri Jul 20, 2018 5:22 pm
Forum: Component Writing
Topic: Question about skinned wxMessageBox
Replies: 7
Views: 1137

Re: Question about skinned wxMessageBox

Screen Shot 2018-07-20 at 19.17.49.png Thanks to you Doublemax, the implementation was quite straightforward. But I still have troubles with automatically centering the message box on the app frame: Calling myMessageBox (my function that replaces wxMessageBox) does not mention the parent window. On...
by bertolino
Fri Jul 20, 2018 1:10 pm
Forum: Component Writing
Topic: Question about skinned wxMessageBox
Replies: 7
Views: 1137

Re: Question about skinned wxMessageBox

Great, I'll get right on it. Thanks!
by bertolino
Fri Jul 20, 2018 11:08 am
Forum: Component Writing
Topic: Question about skinned wxMessageBox
Replies: 7
Views: 1137

Question about skinned wxMessageBox

I plan to make a skinned version of wxMessageBox. I wonder about some aspects:
- Should a class to do that be a good idea (since wxMessageBox is a function)?
- If so, which should be the best base class to derive?
- How to get the modal behavior?

Many thanks for any suggestion,

Pascal
by bertolino
Fri Jul 20, 2018 9:42 am
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 12
Views: 1552

Re: Dark skinned application that flashes when started

Was your EVT_ERASE_BACKGROUND event handler completely empty (that's how it should be) ? Yes Do you use double buffering (wx[Auto]BufferedPaintDC) in the paint event handlers? There is still some noticeable (but different kind of) flicker when resizing the main frame. Not yet, but I will check it, ...
by bertolino
Thu Jul 19, 2018 8:29 pm
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 12
Views: 1552

Re: Dark skinned application that flashes when started

I have investigated and remarked that the flicker didn't happen in the class where the EVT_ERASE_BACKGROUND event was not bound. I also remarked that all my OnPaint methods started with the right dc.Clear() that ensures to erase with the right color. So I removed the EVT_ERASE_BACKGROUND binds and t...
by bertolino
Thu Jul 19, 2018 7:39 pm
Forum: Component Writing
Topic: Dark skinned application that flashes when started
Replies: 12
Views: 1552

Re: Dark skinned application that flashes when started

Doublemax, you have done the right test! Great! With this, what happens is quite clear. To me, the middle figure shows an EVT_ERASE_BACKGROUND event that either erases with the right colour (dark) or the unwanted color (white). As you suggest, I'm going to check what are the differences in those cla...