Page 1 of 2

Outerglow of fields

Posted: Sat Mar 11, 2017 11:34 am
by Hans-Helmut
I very much desire using an "outerglow" of field objects which stretches only outside, and not inside, and does not affect the text of an editable field.

It is unfortunate that the text in a field is also affected by the out glow, inner glow, etc. This must not be in my opinion or should be settable separately. It makes the effect worthless in my case.

The outer glow as offered is radiating outside and inside. I only would like to radiate outside of the field edges.

I can also not set the border line to 0 which I would like to do and still display the outer glow. Doing this, the glow disappears.

The only way I can think of is a work-around also having tried with rectangles or using four lines and grouping them around the field as separate controls assigning glow effects only to them. But still, the glow only can not be set radiating only outside.

I could also use .png images prepared beforehand, but that would counteract the simplicity of the solution.

By the way, working on Windows 10 and Community version 9.0 dp5, the Property Inspectors pane for such shadow effects allows to select such effect, but doing this once, the window suddenly shrinks and the examples look really odd. Is this a bug? Why do the example effects also stretch to the width of the window of the Property Inspector? There is no need doing this in my thinking. I always expect intuitively to be able setting some values. But no ...
There is no way using the Property Inspector to set values for the array of properties. This must be done using scripts as far as I can see.


Any ideas or maybe I am wrong and oversaw what is possible? It took me a lot of time to experiment with all these effects. So, I am not just lightly asking ).

Hans Helmut

Re: Outerglow of fields

Posted: Sat Mar 11, 2017 1:17 pm
by richmond62
outerGlow.png
To be honest I don't know what is going on with your computer:
that took me 2 minutes [stack attached below].
Outer_Limits.livecode.zip
Here's the stack.
(818 Bytes) Downloaded 230 times

Re: Outerglow of fields

Posted: Sat Mar 11, 2017 5:54 pm
by jacque
Make the field opaque. Then you should be able to turn off borders.

To set the properties of the glow, click on the example bar. A second window will appear that lets you set all the elements of the array.

Re: Outerglow of fields

Posted: Sat Mar 11, 2017 6:47 pm
by richmond62
Make the field opaque.
Well, unless you have specifically set the field to be transparent
it should be opaque by default.

Re: Outerglow of fields

Posted: Sun Mar 12, 2017 6:28 pm
by Hans-Helmut
You are right. I only tested with opacity = false. So my background is transparent. I did not even think to make it opaque.

Nevertheless, even then I would like to have it work the way expected and not using a separate control to mimic this effect.

Thanks for all the comments... working )))..
Hans-Helmut

Re: Outerglow of fields

Posted: Mon Mar 13, 2017 7:22 pm
by richmond62
a separate control to mimic this effect
I really wish I knew what you were talking about.

There is no "separate control" and if you want to talk about
mimicry let's get down and dirty and examine the hail
jingbang anent the GUI metaphor and why it has caught
war harns tae the extent that we cannae tak tent o naethin
else either ahind or abune that. Thon's louzed.

You set the outerglow via the properties palette
and that's an end to it.

Re: Outerglow of fields

Posted: Tue Mar 14, 2017 1:06 am
by Hans-Helmut
There is no "separate control" and if you want to talk about
mimicry let's get down and dirty and examine the hail
jingbang anent the GUI metaphor and why it has caught
war harns tae the extent that we cannae tak tent o naethin
else either ahind or abune that. Thon's louzed.
I have a bit of problem reading this ))) :D

Just, as I have no LC with me just now, I would demonstrate and show screen shots - which I may try doing tomorrow if words are too abstract.

The problem on my desktop Windows 10 is the following:

1. The text should not glow -- but it does
2. Even using a transparent field (opaque = false), the outer glow should NOT have an inner glow as well. But it also glows inside (on my desktop Windows LC 9...).

My workaround: I am using a rectangle (opaque = true) sitting behind the editable field in order to achieve the outer glow effect without affecting the inside of the editable field control and without having the text of the editable field also glow.

Well, I hope that I was able to explain in more detail. It is also what I wrote in the beginning more or less.

(Since I am not in possession of a Mac, and I am not using a mobile version, this may only be the effect on Windows.)

Hans-Helmut

Re: Outerglow of fields

Posted: Tue Mar 14, 2017 4:32 am
by jacque
I have a bit of problem reading this ))) :D
We all do, he's lapsed into dialect again. ;)

At any rate, I knew what you meant. When a text field is transparent, the inside and outside of every line, including each text character, is surrounded by glow. It does give the appearance of innerglow in some cases but actually each line is glowing individually around its edges.

In your case, if you can't make the text field opaque, then what you've done is the correct solution.

Re: Outerglow of fields

Posted: Tue Mar 14, 2017 7:22 am
by richmond62
Scots is not "dialect".

It strikes me that IFF LC on Windows is doing this it might be time for a BUG REPORT.

Re: Outerglow of fields

Posted: Tue Mar 14, 2017 7:54 am
by jacque
Not a bug, just how it is. Try adding glow to a transparent field and you'll see. The way to make text with outerglow is to make its field transparent. If you want the field itself to have the effect, make it opaque.

Re: Outerglow of fields

Posted: Tue Mar 14, 2017 7:49 pm
by richmond62
Not a bug, just how it is.
I know that, you know that, but does Hans-Helmut know that?

[Wow: that sounds like the tag-line of a major musical film: "The Sound of LiveCoders" perhaps?]

Mind you I don't know how well either Jacque or I singing "The hills are alive with the sound of scripting"
prancing down the cobbled streets of Edinburgh in a Nun's habit would go down at the box-office.

Re: Outerglow of fields

Posted: Tue Mar 14, 2017 8:04 pm
by jacque
If you wear your kilt, they'll love it. And maybe it would give LC some PR.

Re: Outerglow of fields

Posted: Tue Mar 14, 2017 10:21 pm
by Hans-Helmut
Is the kilt glowing?

Well - if anybody looked at my other post...

http://forums.livecode.com/viewtopic.ph ... ed#p152046

I need an editable field with a transparent background which hilites in it's entire width to give the effect of a field with a fully hilited text content.

Even I published a small exercise stack (to be refined and updated further along). I hope it helps some other beginners like me to get along with customized controls, setting custom properties, using behaviors, applying widgets, and putting it all together. I am sharing some first-year-in-entry-school experiences ).

So, this outer glow is something I wanted to achieve. Since the field property for the background can not be set to be opaque to achieve this desired effect (as discussed above), I am using two additional rectangles, one hiliting when the user enters the field (clicking into the field or using tab), and un-hiliting when working with the text clicking again inside the text or typing something, and the third control is put behind to achieve the "outer glow" effect when the field becomes active. It is needed because the transparent text field will not correctly show the outer glow.

The glow-rectangle is just decoration. But the rectangle giving the effect of hiliting the text in the field is required. Three controls are put on top of each other automatically when the user enters the field. Here i am using a script to set the location and rectangles of these additional controls which exist only once on the card for all fields.

---

I do not see any reason why the effect of outer glow should stretch inside the field when the background is transparent (opaque = false) and why the text characters themselves also inherit this glow.

I would not have to use the other controls if outer glow would remain what it says: Outer glow. )

By the way: The same is true for all the other effects that could be assigned.

And by now, my body is also starting to glow :wink:. Can you see it?

Hans-Helmut

Re: Outerglow of fields

Posted: Tue Mar 14, 2017 10:48 pm
by jacque
I think your glow looks lovely, you would make a good night-light for the bedroom. :)

The way the effects work in transparent fields is actually very useful, and allows a behavior we can't get any other way. It was designed to allow text with special effects without requiring us to import an image for titles and other displays. An added advantage is that the text is smoothly scaleable so it displays well at any resolution.

Try this:
Create a transparent field with a large text size (maybe 40 pts) and no border. Apply an outer glow to the field. The text itself will show the effect. I've used this in a educational game where the user must click on a word to answer a question in a quiz. If the user clicks the correct answer, the text acquires an outer glow to show feedback. It's very effective. Without transparency the field itself would glow, but in the game we don't want that. We want the text itself to light up.

The reason the glow extends inside the field is because the border lines are also affected for display, just as the text is. Glow is applied to all the "edges" of each line, which includes the inner edge. Basically any pixel that isn't transparent gets the effect applied.

Everyone's needs are different, but the current implementation has been useful for many of us.

Re: Outerglow of fields

Posted: Wed Mar 15, 2017 8:38 am
by richmond62
The correct answer
I'll check that one after work today, although that sounds a wee bit dogmatic;
LiveCode not known for "correct" answers, more a multiplicity of ways of
achieving things.