Re: Feature request: add ScaleMode property to StaticBitmap control properties page

Dietmar Schwertberger <[email protected]> Sun, 25 Aug 2019 17:58:49 +0200
Newsgroups gmane.comp.python.wxglade
Message-ID <[email protected]>
On 25.08.2019 15:54, M A wrote:
> Maybe we should just use GenericStaticBitmap instead. I was reading 
> the documentation and only the GenericStaticBitmap widget can use this 
> feature on all platforms. I don't think the user will mind. In fact I 
> think the user will prefer this.
> Yes this is a new feature so not everyone will have access to it until they upgrade. It was added in wxWidgets 3.1.0. I think a simple solution to this problem is to let the user know that if he or she is not using version 3.1.0 of wxWidgets or higher, this feature cannot be used. This check can be run when the user tries to use the ScaleMode field in wxGlade (when it is added).
Unfortunately the generic widgets often behave differently, especially 
when it comes to mouse event handling.
This is probably the same reason why e.g. some widgets can't be dragged 
on macOS.

I need to find a way how to handle this. It's certainly on my list. The 
generic implemenations are also interesting for bitmap buttons. I'm 
thinking about a radio box to select the class when adding a widget, as 
I don't want to have more buttons on the panel. But don't hold your 
breath on this.

For the time being, you can just use the Properties on the Code tab.
Adding property ScaleMode with value Scale_AspectFit should generate the 
required code.

Regards,

Dietmar