-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi All,
Let's say i want to create a toolbar [bold,italic,underline] like in ms office, when i choose , this button(or toolbarbutton or else) will stay pushed (or flat or down). Anyone know how to create a button that stay pushed?
I tried with toolbarbutton, it leave a rectangle mark indicate this toolbarbutton was pushed but when it lost focus, this mark disappear too.
Thanks,
Frederick
use "menubar" instead ?
Arctrev,
How about setting the button to disabled after the user clicks it. I think you could probably set up your CSS so it would look any way you'd like. Consider the following code:
<zk> <div> <separator /> <button label="Click Me"> <attribute name="onClick"> self.setDisabled(true); </attribute> </button> <separator /> <menubar id="menubar" width="50%"> <menu label="Project" image="http://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/Briefcase-16x16.png"> <menupopup> <menuitem image="http://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/BriefcaseSpark-16x16.png" label="New" onClick="self.setDisabled(true);" /> <menuitem image="http://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/BriefcaseOpen-16x16.png" label="Open" onClick="self.setDisabled(true);" /> <menuitem image="http://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/DisketteBlack-16x16.png" label="Save" onClick="self.setDisabled(true);" /> <menuseparator /> <menuitem label="Exit" image="http://www.zkoss.org/zksandbox/img/Centigrade-Widget-Icons/DoorOpen-16x16.png" onClick="self.setDisabled(true);" /> </menupopup> </menu> </menubar> </div> </zk>
Try clicking the button and/or any of the menu items and you'll see the effect.
Just a thought...
Regards,
Todd
Thanks you for the post.
__________________
Asked: 2010-09-28 22:25:38 +0800
Seen: 720 times
Last updated: Oct 15 '10