-
FEATURED COMPONENTS
First time here? Check out the FAQ!
How to draw a line between Zk components? Not just a horizontal line but a zig-zag line.
Basically, I have a hyperlink that I need to connect to a small window. And it is not one instance on the same page there could be more than 10 such connectors. Each connector, connects the link to a discussion window.
Any idea is greatly appreciated.
@rex
If you want draw a zig-zag line, you should calculate and draw by yourself, there's not any easy way to draw it now.
And there's a suggestion for your case(show window for different connectors), apply a Composer to control the zul page,
use Executions.createComponent() to decide when and how to show the window. If all the connectors will do things in the
same window, you could use Server-Push or script to auto-refresh the window, make sure all users will see the same data.
Reference:
ZK Composer
ZK-API Executions.createComponent()
Server-Push
/Joy
Thanks so much for your reply.
However, the key part for me is how to draw a line in ZK. I can figure out how to calculate the points but how do I connect the two points is the question.
Any pointers in this regard will be greatly appreciated.
You can draw a line using canvas component.
The following link may help you:
http://www.zkoss.org/smalltalks/canvas/canvas.dsp
<separator bar="true" /> shows a line. Additionally you can set the lines orientation to vertical or horizontal.
regards
Stephan
Asked: 2009-09-17 15:12:37 +0800
Seen: 1,262 times
Last updated: Sep 23 '09