View Full Version : view with border
sandman
02-19-2003, 07:21 PM
Is is possible to create a view with a border. Also is it possible to create primitive shapes like rectangle, circle etc.
antun
02-19-2003, 08:33 PM
A view with a border would be pretty easy: Just nest a view in another view, and give the first view a dark background color, and the second one the same bgcolor as the background itself:-
<view bgcolor="black" width="100" height="75">
<view bgcolor="white" width="98" height="73" />
</view>
You could use constraints here too, so you didn't have to calculate the relative dimensions.
If you wanted a fancier border, you could use resources, and create a frame similar to that of a window: http://www.laszlosystems.com/developers/learn/documentation/tutorials/window.php
-Antun
Having a border library that is easy to use would be a great asset. Creating such a library seems like it would be easy, but to do something that doesn't require hard-coded heights and widths seems to be a bit tricky.
There are all sorts of options for libraries in, for instance, Java Swing/SWT/AWT. Just some simple things like a line border with a title of the grouped together elements would be useful. Adding it in just as one would a layout may be the easiest way to implement such a feature.
Anyway, just curious if anyone else would find something like this useful, knows of an existing library, or is already working on this type of thing.
Thanks!
antun
06-24-2005, 09:26 AM
There isn't an existing library, but there have been some developments in LZX since this thread was fresh: There is now a drawview class that lets you use a drawing API to draw shapes. In theory this could be used to create borders.
-Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.