Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
You cannot set the "dropShadow" property to a line of text. This applies only to objects. Obviously this does not throw an error, but also has no effect. Try it on a button.
I try to put the same effect that dropShadow with a color "yellow" and browse his opacity between 127 and 255 on only line of my field.
Because when i press arrow key "up" or "down" the elements in the fields move one positons and the second line of my field is the elements chosen
You may have to make your own here, unless the "borderColor" can help you, but that only works with text style "box".
But it would be a fun project to make a graphic that looks like what you want, and does what you want, that is, track the line designated by the user. Do you need help with this?
i found a solution as I have a small number of elements (<= 5), i create a field for each elements and i put them in line 1 of each fields. Now i can use dropShadow.
Thanks for the helps
did you try to turn off "opaque" of the field in the Properties Inspector? Then it will put the dropShadow on the text of the field instead of the field itself. Looks nice.
dunbarx wrote:Is this an undocumented feature? Both the dropShadow and the shadowColor are ostensibly only for objects.
You're both right: Bernd's example shows how graphic effects will render for field text instead of field borders when the field object is transparent, but as you noted graphic effects apply to the object as a whole, rather than specific chunks of text within the field, so valuable as Bernd's example is for other circumstances it won't help tasks where a graphic effect is needed for a subset of text within a field.
Richard Gaskin LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
The OP wanted to "track" individual lines, I suppose as a "hilite" of some kind for lines of interest.
So Probleme, you still have to likely create a graphic of some kind that has the look and feel you want, and then "place" that graphic over the line of interest. As I said, this should be fun...
I only suggested the dropShadow approach after the OP said he had split the 5 lines of his text into 5 fields.
I am well aware that you can not apply a dropShadow to a chunk of text.
What you can do with this technique however is to blur a part of the text when you take a snapshot from the formattedRect of your chunk and place it as e.g. imageSource into your text, replacing the "blackened" text and keeping the original text in metadata or somewhere else. Etc.
And I use it in a ButtonMaker to give the text just a little more depth with an outershadow that is the inverse of the text color. i.e. textcolor black/white outer shadow.