disabling a group

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

disabling a group

Rick Harrison via use-livecode
Hi list,
I have a group that contains various controls, including graphic
objects.
When I disable the group, the colors of every object becomes lighter,
except for graphics whose colors remain the same.
What is the best way to make colors of graphics become lighter when the
group is disabled ?
I tried blending, but then the portions of other controls underneath the
graphic become visible...

Thanks in advance.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: disabling a group

Rick Harrison via use-livecode
On 1/13/21 11:32 AM, jbv via use-livecode wrote:
> Hi list,
> I have a group that contains various controls, including graphic objects.
> When I disable the group, the colors of every object becomes lighter,
> except for graphics whose colors remain the same.
> What is the best way to make colors of graphics become lighter when the
> group is disabled ?
> I tried blending, but then the portions of other controls underneath the
> graphic become visible...

A thought:

You might try overlaying the group or the graphic objects with another
graphic rectangle, set the blending to make it translucent, and then
toggle the visibility of said rectangular graphic.

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: disabling a group

Rick Harrison via use-livecode
Le 2021-01-13 15:34, Mark Wieder via use-livecode a écrit :

> On 1/13/21 11:32 AM, jbv via use-livecode wrote:
>> Hi list,
>> I have a group that contains various controls, including graphic
>> objects.
>> When I disable the group, the colors of every object becomes lighter,
>> except for graphics whose colors remain the same.
>> What is the best way to make colors of graphics become lighter when
>> the
>> group is disabled ?
>> I tried blending, but then the portions of other controls underneath
>> the
>> graphic become visible...
>
> A thought:
>
> You might try overlaying the group or the graphic objects with another
> graphic rectangle, set the blending to make it translucent, and then
> toggle the visibility of said rectangular graphic.

yes, I thought of that; but since I have 20 groups on my card, it will
be simpler to add a line of script and change the graphic color when
toggling between enable & disable.
I was just wondering if there was a secret trick to disable the graphic
and make it look disabled like the rest of the group.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: disabling a group

Rick Harrison via use-livecode
I would consider creating a behavior that either hides the graphic or set the graphic to a lighter value.

Sincerely,

Clarence Martin
Email: [hidden email]
Phone: 626 6965561

-----Original Message-----
From: use-livecode <[hidden email]> On Behalf Of jbv via use-livecode
Sent: Wednesday, January 13, 2021 1:04 PM
To: How to use LiveCode <[hidden email]>
Cc: [hidden email]
Subject: Re: disabling a group

Le 2021-01-13 15:34, Mark Wieder via use-livecode a écrit :

> On 1/13/21 11:32 AM, jbv via use-livecode wrote:
>> Hi list,
>> I have a group that contains various controls, including graphic
>> objects.
>> When I disable the group, the colors of every object becomes lighter,
>> except for graphics whose colors remain the same.
>> What is the best way to make colors of graphics become lighter when
>> the group is disabled ?
>> I tried blending, but then the portions of other controls underneath
>> the graphic become visible...
>
> A thought:
>
> You might try overlaying the group or the graphic objects with another
> graphic rectangle, set the blending to make it translucent, and then
> toggle the visibility of said rectangular graphic.

yes, I thought of that; but since I have 20 groups on my card, it will be simpler to add a line of script and change the graphic color when toggling between enable & disable.
I was just wondering if there was a secret trick to disable the graphic and make it look disabled like the rest of the group.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: disabling a group

Rick Harrison via use-livecode
In reply to this post by Rick Harrison via use-livecode
I have just used setProp in a behaviour button that was assigned to several groups made up of two graphic controls to represent a toggle switch. By setting one custom property the whole appearance of the group can easily be changed. I predefined the colours for each state in more custom properties, I’m sure this could be adapted to suit your case.

Rather than explain everything in detail here, I have uploaded a stripped down stack to dropbox which I’m sure you could easily modify the behaviour script to change the appearance of your graphics in a similar way. If you need any more explanation, just ask, but I’m sure you will get the idea.

Dropbox Link; https://www.dropbox.com/s/misiog5bwathpgy/Toggle%20Switch.livecode?dl=0

Paul

> On 13Jan, 2021, at 1:04 PM, jbv via use-livecode <[hidden email]> wrote:
>
> Le 2021-01-13 15:34, Mark Wieder via use-livecode a écrit :
>> On 1/13/21 11:32 AM, jbv via use-livecode wrote:
>>> Hi list,
>>> I have a group that contains various controls, including graphic objects.
>>> When I disable the group, the colors of every object becomes lighter,
>>> except for graphics whose colors remain the same.
>>> What is the best way to make colors of graphics become lighter when the
>>> group is disabled ?
>>> I tried blending, but then the portions of other controls underneath the
>>> graphic become visible...
>> A thought:
>> You might try overlaying the group or the graphic objects with another
>> graphic rectangle, set the blending to make it translucent, and then
>> toggle the visibility of said rectangular graphic.
>
> yes, I thought of that; but since I have 20 groups on my card, it will
> be simpler to add a line of script and change the graphic color when
> toggling between enable & disable.
> I was just wondering if there was a secret trick to disable the graphic
> and make it look disabled like the rest of the group.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: disabling a group

Rick Harrison via use-livecode
Hi Paul,
Thank you for sharing.
I think I will stick with 1 single line of script that changes the
graphic color.
But I still need to understand why graphics colors don't change
when disabled.

Le 2021-01-13 22:29, Paul Hibbert via use-livecode a écrit :

> I have just used setProp in a behaviour button that was assigned to
> several groups made up of two graphic controls to represent a toggle
> switch. By setting one custom property the whole appearance of the
> group can easily be changed. I predefined the colours for each state
> in more custom properties, I’m sure this could be adapted to suit your
> case.
>
> Rather than explain everything in detail here, I have uploaded a
> stripped down stack to dropbox which I’m sure you could easily modify
> the behaviour script to change the appearance of your graphics in a
> similar way. If you need any more explanation, just ask, but I’m sure
> you will get the idea.
>
> Dropbox Link;
> https://www.dropbox.com/s/misiog5bwathpgy/Toggle%20Switch.livecode?dl=0
>
> Paul
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode