FOriginalWidth, Height and Thickness

Support forum for collection of native FMX shape controls.

FOriginalWidth, Height and Thickness

Postby Markus » Thu Jun 04, 2015 5:55 am

RadiantShapes_Version = '1.0.1'; Delphi XE8, Win 8.1
In TRadiantShape the FOriginalWidth, FOriginalHeight and FOriginalThickness are private and hence not accessible from derived classes. While this is perfectly fine for the use in the Delphi IDE form designer, for my use case I would need to manipulate these fields at runtime. Let me explain: I am creating sort of a FMX runtime form designer. Sort of, because it behaves more like Powerepoint than the Delphi IDE form designer. This also involves the ability for the user to zoom in / out into the the designer. We achieve the zooming effect by having the controls alignment set to scale. This works quite well. But when the user voluntarily resizes the control (by means of an adapted TSelection) we need to change the FOriginalWidth etc.
So my question is, if you see the possibility to put those properties into a protected section.

TIA,
Markus
Markus
 
Posts: 7
Joined:
Wed Jun 03, 2015 2:51 am

Re: FOriginalWidth, Height and Thickness

Postby Raize Support » Thu Jun 04, 2015 2:47 pm

Hi Markus,

Interesting situation. Are you creating descendants of the Radiant Shapes controls? The reason I ask is that if we were to move those properties to the protected section and you were NOT creating descendants, you will still have to create an access class (hack) to get to the those properties. Making these values public would probably be better for your use.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 613
Joined:
Fri Mar 25, 2011 9:04 pm

Re: FOriginalWidth, Height and Thickness

Postby Markus » Thu Jun 04, 2015 4:04 pm

HI Ray,
indeed I create descendants from several Radiantshapes. Therefore putting those properties in a protected section would do. I have a feeling that making them public would't be the right place, as this would imply that users can access them freely, for which they are not meant imo.

Markus
Markus
 
Posts: 7
Joined:
Wed Jun 03, 2015 2:51 am


Return to Radiant Shapes

Who is online

Users browsing this forum: No registered users and 1 guest