<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window id="example-window" title="Example 7.4.2"
        xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script>
function showPositionAndSize()
{
  var labelbox = document.getElementById('thelabel').boxObject;

  alert("Position is (" + labelbox.x + "," + labelbox.y +
        ") and size is (" + labelbox.width + "," +
        labelbox.height + ")");
}
</script>

<button label="Hide"
        oncommand="document.getElementById('thelabel').hidden = true;"/>
<button label="Show"
        oncommand="document.getElementById('thelabel').hidden = false;"/>
<button label="Collapse"
        oncommand="document.getElementById('thelabel').collapsed = true;"/>
<button label="Uncollapse"
        oncommand="document.getElementById('thelabel').collapsed = false;"/>
<button label="Show Position/Size"
        oncommand="showPositionAndSize();"/>
<label id="thelabel" value="I am a label"/>


</window>

