Field drop shadow
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Field drop shadow
Hi,
I'm having an odd problem with a field's drop shadow. In the code I am just doing :
set the shadow of field whatever to true
This seems to give an offset, flat grey shadow that lies within the field boundaries.
The property inspector shows shadow is off. Using the property inspector to switch on a drop shadow then gives a drop shadow, black, blended, outside the field boundaries where it should be. There is nothing I can do in the property inspector to turn off this "inner" drop shadow.
In code, using "set the shadow of field whatever to false" does of course remove the inner effect.
So the question is, what is the code line generating on that field, if not a drop shadow ?
Kevin
I'm having an odd problem with a field's drop shadow. In the code I am just doing :
set the shadow of field whatever to true
This seems to give an offset, flat grey shadow that lies within the field boundaries.
The property inspector shows shadow is off. Using the property inspector to switch on a drop shadow then gives a drop shadow, black, blended, outside the field boundaries where it should be. There is nothing I can do in the property inspector to turn off this "inner" drop shadow.
In code, using "set the shadow of field whatever to false" does of course remove the inner effect.
So the question is, what is the code line generating on that field, if not a drop shadow ?
Kevin
Re: Field drop shadow
and the answer is....
use "set the dropshadow"
not "set the shadow"
dictionary was a bit confusing there !
use "set the dropshadow"
not "set the shadow"
dictionary was a bit confusing there !
Re: Field drop shadow
Hi Kevin,
Best
Klaus
that line will create a custom property named "shadow" for your field!kevin11 wrote:...
In code, using "set the shadow of field whatever to false" does of course remove the inner effect.
So the question is, what is the code line generating on that field, if not a drop shadow?

Best
Klaus
Re: Field drop shadow
Hi Kewin,
The dropshadow is an array property
You can set dropshadow of an object or not like that
set dropShadow["size"] of fld "myField" to 8 -- or an integer between 0 and 255
set dropShadow["size"] of fld "myField" to 0 -- dropshadow is not visible
( i write under the Klaus's control)
Best regards
Jean-Marc
The dropshadow is an array property
You can set dropshadow of an object or not like that
set dropShadow["size"] of fld "myField" to 8 -- or an integer between 0 and 255
set dropShadow["size"] of fld "myField" to 0 -- dropshadow is not visible
( i write under the Klaus's control)

Best regards
Jean-Marc
https://alternatic.ch
Re: Field drop shadow
You are a good boy, Jean-Marc! 

-
- VIP Livecode Opensource Backer
- Posts: 157
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Field drop shadow
Hi Kevin,
This may be overkill for you, but I've coded drop shadows before.... here's an example that I've put in a handler associated with a mouseDown in a graphic. It would also work for a field.
set the dropShadow["color"] of target to "0,0,0"
set the dropShadow["blendMode"] of target to "normal"
set the dropShadow["opacity"] of target to "200"
set the dropShadow["filter"] of target to "gaussian" -- highest "box2pass" is medium quality
set the dropShadow["spread"] of target to "0"
set the dropShadow["size"] of target to "6"
set the dropShadow["distance"] of target to "6"
set the dropShadow["angle"] of target to "45"
You can then clear all of the dropShadow settings by
set the dropShadow of target to "false"
I've use the set to false in the mouseUp handler of the same graphics.
be well,
randy
This may be overkill for you, but I've coded drop shadows before.... here's an example that I've put in a handler associated with a mouseDown in a graphic. It would also work for a field.
set the dropShadow["color"] of target to "0,0,0"
set the dropShadow["blendMode"] of target to "normal"
set the dropShadow["opacity"] of target to "200"
set the dropShadow["filter"] of target to "gaussian" -- highest "box2pass" is medium quality
set the dropShadow["spread"] of target to "0"
set the dropShadow["size"] of target to "6"
set the dropShadow["distance"] of target to "6"
set the dropShadow["angle"] of target to "45"
You can then clear all of the dropShadow settings by
set the dropShadow of target to "false"
I've use the set to false in the mouseUp handler of the same graphics.
be well,
randy