home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / mozil06.zip / bin / res / samples / hidetoolicon.xul < prev    next >
Extensible Markup Language  |  2001-02-14  |  2KB  |  44 lines

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="hidetoolicon.css" type="text/css"?> 
  3.  
  4. <window xmlns:html="http://www.w3.org/1999/xhtml"
  5.     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  6.     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  7.     align="vertical"> 
  8.  
  9.     <html:script>
  10.     function cmdHideButtonOne(){
  11.         window.document.getElementById("ShowButton").setAttribute("buttonmode", "hideOne");        
  12.     }
  13.  
  14.     function cmdHideButtonTwo() {
  15.         window.document.getElementById("ShowButton").setAttribute("buttonmode", "hideTwo");
  16.     }
  17.  
  18.     function cmdHideAll() {
  19.         window.document.getElementById("ShowButton").setAttribute("buttonmode", "hideAll");
  20.     }
  21.  
  22.     function cmdShowAll() {
  23.         window.document.getElementById("ShowButton").setAttribute("buttonmode", "showAll");
  24.     }
  25.     </html:script>
  26.  
  27.     <broadcaster id="ShowButton" buttonmode="showAll" />
  28.     <observes element="ShowButton" attribute="buttonmode" />
  29.     <toolbox>
  30.         <toolbar>
  31.             <html:input type="BUTTON" value="Button 1" id="ButtonOne"/>
  32.             <html:input type="BUTTON" value="Button 2" id="ButtonTwo"/>
  33.             <spring flex="1"/>
  34.         </toolbar>
  35.     </toolbox>
  36.  
  37.     <box flex="1">
  38.         <html:input flex="1" type="BUTTON" value="Hide Only Button 1" onclick="cmdHideButtonOne()"/>
  39.         <html:input flex="1" type="BUTTON" value="Hide Only Button 2" onclick="cmdHideButtonTwo()"/>
  40.         <html:input flex="1" type="BUTTON" value="Hide Both" onclick="cmdHideAll()"/>
  41.         <html:input flex="1" type="BUTTON" value="Show Both" onclick="cmdShowAll()"/>
  42.     </box>
  43. </window>
  44.