Conditionalize Visibility with Constraints
The button bar on my "project page":http://osteele.com/projects has a "Powered by OpenLaszlo" watermark. It's at the right edge of the window. Positioning it there was easy[1]:
[code]
[/code]
!/images/os-watermark.png!
A problem with this implementation is that the logo overlaps the search field when the window is narrow:
!/images/os-watermark-oops.png!
I wanted it to disappear instead.
Here's the version that does that. The new code is the "visible" attribute, on the first line.
[code]
[/code]
This hides the view whenever the layout rules or (in this case) other constraints would have moved it over the view to its left. Here I've hardwired the name of the view to its left, but for this application, that's okay.
!/images/os-watermark-hidden.png!
fn1. The actual source is longer than this, since it has a click handler to go to the OpenLaszlo home page, and mouse handers to dim the watermark when the mouse isn't over it. But this much handles the visuals.








