smarthaert / phoenixlib

Automatically exported from code.google.com/p/phoenixlib
0 stars 0 forks source link

Hide the control if the alpha or scale is zero is not working! #95

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Because Alpha is Single, sometimes Alpha=0 but the If (Alpha>=0) always returns 
True.

I have change from 0 to 0.001 and now is working! But I would like to know the 
correct way to do this! =)

    // Hide the control if the alpha or scale is zero
    Control.Visible:= (Scale >= 0) and (Alpha >= 0.001);

Original issue reported on code.google.com by wagenhei...@gmail.com on 10 Nov 2010 at 1:49

GoogleCodeExporter commented 9 years ago
That's probably the way to do it, and same for scale.

Original comment by andreas....@gmail.com on 10 Nov 2010 at 6:57

GoogleCodeExporter commented 9 years ago
I suggest using this!

http://www.delphibasics.co.uk/RTL.asp?Name=CompareValue

Original comment by wagenhei...@gmail.com on 10 Nov 2010 at 11:53

GoogleCodeExporter commented 9 years ago
Changed to this

 Control.Visible:= (Scale >= 0.01) and (Alpha >= 0.01);

Original comment by andreas....@gmail.com on 11 Nov 2010 at 6:21