Page 1 of 1

Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 12:31 am
by ElZitouni
Hello: I would like to have some (i.e., 3) buttons on my card that the user can click. These buttons should be "transparent" in that the desktop underlying the stack can be seen through them. Is that possible in livecode? Thank you for your help, Olli

Re: Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 1:20 am
by PBH
I'm not sure you can make just the buttons transparent, but you can use an image to determine which areas of a stack are transparent, see this lesson for details:

https://lessons.livecode.com/m/4071/l/6 ... ndow-shape

You can also use the colors tab of the stack inspector to change the transparency of the whole stack using the Blendlevel property.

Paul

Re: Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 2:06 am
by ElZitouni
Thanks for this link, Paul -- I have been playing with that stack today, and the thing is that if you click into the transparent area, mouseUp will not be sent, instead you get a suspendStack because you are clicking outside the clickable are. Perhaps it is different if the transparency is not 100%. I will play around with that.

Re: Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 2:25 am
by ElZitouni
I think i solved my little problem.
I generated an image in Photoshop, and where the button is supposed to be, I had a shape with 25% opacity. Then I made that image the windowshape of my stack (as described in the linked lesson above and other places). placed a transparent button over that 25% area, and now I have a window to the desktop that can be clicked. That window is not fully transparent, but I think as long as the opacity is not 100%, it will work.
Olli.

Re: Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 7:57 am
by bogs
ElZitouni wrote:
Fri Jul 02, 2021 12:31 am
Hello: I would like to have some (i.e., 3) buttons on my card that the user can click. These buttons should be "transparent" in that the desktop underlying the stack can be seen through them. Is that possible in livecode? Thank you for your help, Olli
Yes, that is not only possible, but very easy as well, using blend level and choosing the proper ink.

Image

Re: Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 1:11 pm
by Klaus
Does not work on my Mac using LC 9.6.2?
Bildschirmfoto 2021-07-02 um 14.11.06.jpg

Re: Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 2:55 pm
by FourthWorld
The issue allowing control inks to make a portion of the window transparent is specific to Linux and has been reported as a bug:
https://quality.livecode.com/show_bug.cgi?id=19700

Turning something like that into feature for all supported platforms has also been submitted as a request:
https://quality.livecode.com/show_bug.cgi?id=16782

Re: Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 3:10 pm
by Klaus
AHA! :-)
Thanks for the info.

Re: Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 5:03 pm
by jacque
To make a control appear transparent while still responding to mouse clicks, set its blendlevel to 99. Any setting less than 100 will allow mouse events, and 99% transparency can't be detected visually.

Re: Buttons through which i can see desktop

Posted: Fri Jul 02, 2021 9:15 pm
by bogs
My apologies to the OP, I did not remember this until Richard posted.

@Jacque - not in the way the OP was looking for it too work, the way I read it (the bold / italic below) -
...These buttons should be "transparent" in that the desktop underlying the stack can be seen through them.
My pictures came straight from 'nix (where what I illustrated *does* work), but apparently does not work on Win or Mac. I find this a bit odd, since the stack itself *can* be blended to transparency and show what is behind it (but then, of course, everything *on* the stack is blended whether desired or not). Goofy.