Questions: Setting the borderWidth (lineSize) of a graphic through script

Mark Waddingham mark at livecode.com
Fri Jan 29 13:21:31 EST 2016


On 2016-01-29 17:33, Roland Huettmann wrote:
> ShowBorder was set to true in all cases.
> ThreeD must be set to false in the case of buttons, etc.
> 
> LineSize: Works exclusively on graphics, NOT on other objects
> 
> BorderWidth works on objects such as fields, buttons, etc. but NOT on
> graphics.
> 
> According to Dictionary borderwWdth and lineSize are synonyms and even 
> an
> example is given which does not work.

Well, this is a little tricky.

For all non-graphic objects, penWidth, penHeight, lineSize and 
borderWidth are all synonyms.

For graphic objects, penWidth, penHeight and lineSize are synonyms, 
borderWidth is the same as borderWidth on non-graphic objects.

(Basically the graphic object 'overrides' the lineSize, penWidth and 
penHeight properties mapping them all to the strokeWidth).

I'm not entirely sure the best way to document this relationship as 
these keywords aren't exactly synonyms, as what they are synonymous with 
depends on the object type!

BorderWidth works fine on graphics here - you set the showBorder to 
true, and set the borderWidth. You'll get the original shape inset by 
the borderWidth with the border drawn around it.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the Use-livecode mailing list