Page 1 of 1

Showing only one border?

Posted: Mon Feb 23, 2015 4:14 pm
by Vanceone
Is there a way to only show one border on an object; specifically the top border of a field? In HTML you can control which border is shown, is Livecode capable? I've searched and found nothing, surely this has come up before.

I tried to do just a straight horizontal black line, but when I test in the simulator the line slants down on the right side; presumably the pixel upscaling is running from the top left pixel to the bottom right, thus causing the line to slant ever so noticeably and creating artifacts in the line. (Is that a bug, btw--that I cannot get a straight line to stay straight? I'm using NativeGeometry, not sure if that is causing anything to go wrong.)

My current solution is to have a black background graphic under the field, with its top property about 5 pixels less than the field, thus coming above the field and creating an apparent black line. But it would be so much easier if we could control which borders to display.


Re: Showing only one border?

Posted: Mon Feb 23, 2015 5:02 pm
by Klaus
Hi Vanceone,

sorry, this is not possible in Livecode, you will need to "fake" that look.



Re: Showing only one border?

Posted: Mon Feb 23, 2015 7:58 pm
by dunbarx

Do you know what Klaus meant by "fake"? Can you create a line graphic that tracks any given side of a control? For extra credit, a polyline that tracks two or three sides?

Craig Newman

Re: Showing only one border?

Posted: Tue Feb 24, 2015 1:09 am
by Vanceone
Well, it is unfortunate that we cannot turn a variety of sides on and off. As for creating a line graphic, yes of course. Just set the points of the line to the top, right (or whatever side you want).

But When my line is scaled to fit mobile... it wasn't staying straight.

So I built my background graphic, filled it with black and just slightly offset it. You can do that for all four sides.