LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.
2 posts • Page 1 of 1
In a widget how do I inherit the borderWidth property from the engine for use with canvas strokes? In the dictionary the signature widget (indy) is the only widget that has that property, but that doesn't come with source code. I already know how to inherit/convert color properties like borderColor, I just need an example for getting the borderWidth.
@LCMark answered my question on Gitter, pasting here for future reference:
I might just make that chart myself when I get a chance.The borderWidth isn't an inherited property and so isn't one which is excluded from being used as a widget property. The signature widget just does:
private variable mBorderWidth as Number
property "borderWidth" get mBorderWidth set SetBorderWidth
metadata borderWidth.editor is "com.livecode.pi.number"
metadata borderWidth.label is "Border width"
metadata borderWidth.step is "1"
metadata borderWidth.default is "1"
metadata borderWidth.min is "0"
metadata borderWidth.max is "10"
Paul McClernan @PaulMcClernan 11:40
@runrevmark Thanks (yet again), I was just about to go back to my custom get/set handlers too, I had tried all sorts of things like:
put the stroke width of this canvas into mStrokeSize
put the width of my stroke into mStrokeSize
I'd be great if there was a chart somewhere of what properties are inherited, next to an example of using them with their LCB counterparts.
Something a little more useful than slide 6 of this:
https://livecode.com/topic/accessing-li ... roperties/