Visual links between Widgets
Added by Bart AM over 13 years ago
Hi,
I would like to get some visual links between widgets like this : http://imageshack.us/photo/my-images/268/linksuw.jpg/
Thoses links must be redrawable to change destination or source.
Is this possible ?
Replies (7)
RE: Visual links between Widgets - Added by Koen Deforche over 13 years ago
Hey,
If you use absolute positioning for all your widgets, then you can put your widgets overlayed on a (large) WPaintedWidget and draw the lines on this WPaintedWidget:
Create a WContainerWidget with explicit size
- add a WPaintedWidget with explicit size, absolutely positioned (0, 0, width, height)
-> here you draw the lines - add a WContainerWidget with explicit size, absoltely positioned (0, 0, width, height) and z-index 100
-> here you draw the widgets
Regards,
koen
RE: Visual links between Widgets - Added by Bart AM over 13 years ago
Hi Koen,
I implemented your solution and it works just fine.
Thank you for your answer.
Regards,
Bart
RE: Visual links between Widgets - Added by Bart AM over 13 years ago
Hey,
I tryed to modify the pen with
setStyle(DotLine);
I get a visual changement (dotted line) on IE, but the line doesnt change on Chrome / Firefox / Safari.
Is this normal ?
RE: Visual links between Widgets - Added by Wim Dumon over 13 years ago
That's because unfortunately canvas does not support dotted lines.
BR,
Wim.
RE: Visual links between Widgets - Added by Bart AM over 13 years ago
Ok so there is no way to do this for now.
Thank you for your answer.
Regards,
Bart
RE: Visual links between Widgets - Added by Michael Leitman almost 13 years ago
I am really sorry, to resurrect this thread :-/
but as you, Koen, said "... If you use absolute positioning for all your widgets ..."
what if i positioning all of my widgets with LayoutManagers?
I tried to get the height of my widgets, but they mostly return 0 (in Pixel) because i resize them with WLength::Auto.
Is there a Way to get the Location/Size of the widgets/widgetContainers from the browser?
I attached a screenshot of what i want to do.
Layout_with_visual_link.PNG (17 KB) Layout_with_visual_link.PNG | All of the widget can have dynamic size, even hidden |
RE: Visual links between Widgets - Added by Wim Dumon almost 13 years ago
That sounds like WWidget::setLayoutSizeAware()
This will cause client-side layout-manager induced size changes to be propagated back to the server.
BR,
Wim.