Buttons through which i can see desktop

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ElZitouni
Posts: 33
Joined: Sun Oct 14, 2012 10:43 pm

Buttons through which i can see desktop

Post by ElZitouni » 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

PBH
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 129
Joined: Sun Feb 20, 2011 4:26 pm
Location: Vancouver Island, BC, Canada. ex.UK
Contact:

Re: Buttons through which i can see desktop

Post by PBH » Fri Jul 02, 2021 1:20 am

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

ElZitouni
Posts: 33
Joined: Sun Oct 14, 2012 10:43 pm

Re: Buttons through which i can see desktop

Post by ElZitouni » Fri Jul 02, 2021 2:06 am

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.

ElZitouni
Posts: 33
Joined: Sun Oct 14, 2012 10:43 pm

Re: Buttons through which i can see desktop

Post by ElZitouni » Fri Jul 02, 2021 2:25 am

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.

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Buttons through which i can see desktop

Post by bogs » Fri Jul 02, 2021 7:57 am

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
Image

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Buttons through which i can see desktop

Post by Klaus » Fri Jul 02, 2021 1:11 pm

Does not work on my Mac using LC 9.6.2?
Bildschirmfoto 2021-07-02 um 14.11.06.jpg

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Buttons through which i can see desktop

Post by FourthWorld » Fri Jul 02, 2021 2:55 pm

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
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Buttons through which i can see desktop

Post by Klaus » Fri Jul 02, 2021 3:10 pm

AHA! :-)
Thanks for the info.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Buttons through which i can see desktop

Post by jacque » Fri Jul 02, 2021 5:03 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Buttons through which i can see desktop

Post by bogs » Fri Jul 02, 2021 9:15 pm

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.
Image

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”