Re: Feature request: add ScaleMode property to StaticBitmap control properties page
M A <[email protected]> Sun, 25 Aug 2019 09:54:49 -0400
| Newsgroups | gmane.comp.python.wxglade |
|---|---|
| Message-ID | <[email protected]> |
> On Aug 25, 2019, at 9:08 AM, Dietmar Schwertberger <[email protected]> wrote: > > On 24.08.2019 18:32, M A wrote: >> Hi, currently the StaticBitmap widget displays a picture at its native resolution. This causes big pictures to be cropped in the widget. With the addition of the ScaleMode property, the picture can be automatically resized to fit the widget using the Scale_AspectFit, Scale_AspectFit, or Scale_Fill. > > I have just tried, but at least on 4.0.2a1 on Windows it's not supported by StaticBitmap, only GenericStaticBitmap . > > I'm not sure yet how to support some of the generic widgets better, but at the moment implementing ScaleMode seems pointless. > > Regards, > > Dietmar > 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). Thank you.