Change MagnifierGlass Height and Width

320 views Asked by At

When I create FireMonkey app , and drop MagnifierGlass component , I can see in the Object Inspector Height and Width properties of the MagnifierGlass , but I can't change those properties , So :

  • Why we can't change properties Height and Width ?

  • If i need to make it bigger or smaller , How can i do that?

    Note: I'm using Delphi 10 Seattle.

1

There are 1 answers

0
EugeneK On

Looks like there is a bug in default style in Delphi 10 Seattle for MagnifierGlass but only if LoupeMode is set for Circle, so easiest way is to change LoupeMode for Rectangle, then you'll be able to resize it on form. If you want to use it with LoupeMode=Circle, you can fix one of the custom styles, for example as following

In this file C:\Program Files (x86)\Embarcadero\Studio\17.0\Redist\styles\Fmx\Win10Modern.Style find following lines

  object TLayout
    StyleName = 'magnifierglassstyle'
    FixedWidth = 150
    FixedHeight = 150

replace it with

  object TLayout
    StyleName = 'magnifierglassstyle'
    Size.Width = 50.000000000000000000
    Size.Height = 50.000000000000000000
    Size.PlatformDefault = False

Now drop StyleBook component on form and set FileName property to C:\Program Files (x86)\Embarcadero\Studio\17.0\Redist\styles\Fmx\Win10Modern.Style

Set StyleBook property of your Form to StyleBook1

Now if you drop MagnifierGlass on form you'll be able to resize it.

This is not needed in Delphi 10.1 Berlin since you can edit FixedHeight and FixedWidth properties in the Style Editor there.

Update

I've created bug report about this issue