Page 1 of 1
Line customisation
Posted: Sat Nov 07, 2020 8:55 am
by glenn9
Hi everyone,
For a list field I'd like to customise the appearance of the lines within a field.
For the background colour I can simply set the 'backcolor' property for the lines by script, but I was wanting to set some kind of border property for the lines, eg colour, either by script or via the property inspector (not that I can see this option for lines in the inspector).
Just wanted to check if anyone had any information on how to do this?
Many thanks,
Kind regards,
Glenn
Re: Line customisation
Posted: Sat Nov 07, 2020 10:24 am
by glenn9
... or is it possible to insert a LINEGRAPHIC by script after a LINE is added to the list field?
Re: Line customisation
Posted: Sun Nov 08, 2020 4:40 am
by dunbarx
Hi.
I think you will have to roll your own if you want anything more than:
Code: Select all
set the textStyle of line 3 of fld 1 to "box"
You will have to create a line or rectangular graphic and place it over the line(s) of interest. Easy enough, and then you have complete control over how those graphics look, line weight, color, blend level, whatever.
Craig
Re: Line customisation
Posted: Sun Nov 08, 2020 9:36 am
by FourthWorld
Version 5.5 introduced a number of paragraph-level properties, including borderWidth and borderColor:
https://livecode.fandom.com/search?query=Paragraph
Re: Line customisation
Posted: Sun Nov 08, 2020 10:52 pm
by bn
have a look at the stack I posted recently that demonstrates the formatting addition introduced in LC 5.5 Richard mentioned.
It was done by Livecode's Benjamin Beaumont at the time.
I think it is a nice demo that unfortunately was never really given the publicity it deserves.
http://forums.livecode.com/viewtopic.ph ... 44#p197942
Kind regards
Bernd
Re: Line customisation
Posted: Mon Nov 09, 2020 11:20 am
by glenn9
Craig, Richard, Bernd,
Many thanks for all these tips, these were really helpful and I've now solved the headache I was having!
(Bernd, I thought the stack that you shared was a real goldmine of useful utilities - thanks for this.)
Kind regards, Glenn
Re: Line customisation
Posted: Mon Nov 09, 2020 2:52 pm
by dunbarx
Hi.
Glad you seem to have a solution. but I thought you wanted something like this:
Craig
Re: Line customisation
Posted: Tue Nov 10, 2020 11:02 am
by glenn9
dunbarx wrote: ↑Mon Nov 09, 2020 2:52 pm
Hi.
Glad you seem to have a solution. but I thought you wanted something like this:
linetest.livecode.zip
Craig
Hi Craig,
It started off as exactly as you described, but then on learning of the additional capabilities, and with the extra understanding, I've expanded the scope a little!
but thank you for your help and suggestions,
Regards,
Glenn