Make a border around a substack

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!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Make a border around a substack

Post by erikhans08 » Thu Aug 11, 2016 5:38 pm

Is there a way to make a border around a substack? My substacks have the same background color as the mainstack so there is no delineation.
Thanks,
Erik Hansen

erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Re: Make a border around a substack

Post by erikhans08 » Thu Aug 11, 2016 5:48 pm

These substacks are Palettes.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9662
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Make a border around a substack

Post by dunbarx » Thu Aug 11, 2016 6:17 pm

I did not think that stacks, or rather cards, had a "border" property, though the dictionary gives an example of setting the width of a card border, though doing so seems to do nothing, and no error is thrown.

So I am not sure about a native way to do this.

But you can always create a rectangle graphic, and set its rect to the card rect. Color it as you want, and set its lineSize to whatever.

Craig Newman

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

Re: Make a border around a substack

Post by FourthWorld » Thu Aug 11, 2016 6:47 pm

Three card properties to consider:
showBorder
threeD
borderWidth
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

erikhans08
Posts: 87
Joined: Wed Mar 25, 2015 2:01 am

Re: Make a border around a substack

Post by erikhans08 » Thu Aug 11, 2016 7:22 pm

Yes! ShowBorder = true and BorderWidth = 1.
I do use Craig's rectangle graphic for an border surrounding a grid in another context.
I drag-draw the whole thing as an easy way to get attention.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9662
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Make a border around a substack

Post by dunbarx » Thu Aug 11, 2016 8:52 pm

Well what do you know, Cards have borders, even though that property is not present in the inspector.

But changing the borderWidth property does nothing unless I navigate off the stack and come back. Other properties, such as the borderColor, change as advertised.

Craig

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

Re: Make a border around a substack

Post by FourthWorld » Thu Aug 11, 2016 10:02 pm

dunbarx wrote:Well what do you know, Cards have borders, even though that property is not present in the inspector.
The Inspector is a subset of properties, showing only the most commonly used one. But LC is a deep language, so there's always something new to discover. This Property Sheet tool shows all props returned from "the properties":
http://fourthworld.net/revnet/devolutio ... ops.rev.gz
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

PaulDaMacMan
Posts: 627
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Make a border around a substack

Post by PaulDaMacMan » Fri Sep 25, 2020 6:19 pm

FourthWorld wrote:
Thu Aug 11, 2016 10:02 pm
dunbarx wrote:Well what do you know, Cards have borders, even though that property is not present in the inspector.
The Inspector is a subset of properties, showing only the most commonly used one. But LC is a deep language, so there's always something new to discover. This Property Sheet tool shows all props returned from "the properties":
http://fourthworld.net/revnet/devolutio ... ops.rev.gz
Hey Richard,
I just found your tool while working on some Widget Properties... Just an FYI, it doesn't list some Widget properties, at least not beyond some of the basics. For example: I've shadowed the LiveCode property borderColor in my Widget (along with a some others standard and some custom props too) but that isn't listed. Maybe because 'the properties' is limited or hasn't been updated to support Widget properties? Still a useful tool though, thanks!
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

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

Re: Make a border around a substack

Post by FourthWorld » Fri Sep 25, 2020 6:42 pm

PaulDaMacMan wrote:
Fri Sep 25, 2020 6:19 pm
I just found your tool while working on some Widget Properties... Just an FYI, it doesn't list some Widget properties, at least not beyond some of the basics. For example: I've shadowed the LiveCode property borderColor in my Widget (along with a some others standard and some custom props too) but that isn't listed. Maybe because 'the properties' is limited or hasn't been updated to support Widget properties? Still a useful tool though, thanks!
Exactly. In this early stage of LCB widgets are not yet first-class citizens with regard to some universal ways of working with objects in LC Script. My understanding is that there's interest in unifying this currently-bifurcated introspection by allowing property access with widgets via "the properties". When that happens my 4W Property Sheet and everything else in our community that works with "the properties" will automatically handle widgets just as gracefully.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

PaulDaMacMan
Posts: 627
Joined: Wed Apr 24, 2013 4:53 pm
Contact:

Re: Make a border around a substack

Post by PaulDaMacMan » Sun Sep 27, 2020 2:48 pm

FourthWorld wrote:
Fri Sep 25, 2020 6:42 pm
PaulDaMacMan wrote:
Fri Sep 25, 2020 6:19 pm
I just found your tool while working on some Widget Properties... Just an FYI, it doesn't list some Widget properties, at least not beyond some of the basics. For example: I've shadowed the LiveCode property borderColor in my Widget (along with a some others standard and some custom props too) but that isn't listed. Maybe because 'the properties' is limited or hasn't been updated to support Widget properties? Still a useful tool though, thanks!
Exactly. In this early stage of LCB widgets are not yet first-class citizens with regard to some universal ways of working with objects in LC Script. My understanding is that there's interest in unifying this currently-bifurcated introspection by allowing property access with widgets via "the properties". When that happens my 4W Property Sheet and everything else in our community that works with "the properties" will automatically handle widgets just as gracefully.
OK, Widgets have been part of LC for at least 5-6 years so I assumed they were already first-class citizens by now.
Until then this works to get a list of widget properties (not sure if this works on Linux):
-- passing the returned value of: the kind of widget "My Widget"
put the keys of (revIDEExtensionProperties("community.livecode.widget.piano"))

viewtopic.php?t=27183
My GitHub Repos: https://github.com/PaulMcClernan/
Related YouTube Videos: PlayList

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

Re: Make a border around a substack

Post by FourthWorld » Sun Sep 27, 2020 4:05 pm

Thanks, Paul. You're welcome to add that if you like. Just email me the updated stack file and I'll merge the change(s) into the master and post an update.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”