Showing only one border?

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
Vanceone
Posts: 37
Joined: Sat Dec 15, 2012 7:27 pm

Showing only one border?

Post by Vanceone » Mon Feb 23, 2015 4:14 pm

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.

Thanks.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Showing only one border?

Post by Klaus » Mon Feb 23, 2015 5:02 pm

Hi Vanceone,

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


Best

Klaus

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

Re: Showing only one border?

Post by dunbarx » Mon Feb 23, 2015 7:58 pm

Hi.

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

Vanceone
Posts: 37
Joined: Sat Dec 15, 2012 7:27 pm

Re: Showing only one border?

Post by Vanceone » Tue Feb 24, 2015 1:09 am

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.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”