Friday, February 28, 2014

Re: How do disable and/or hide a MenuItem ????

MenuItem is a pretty standard Widget in GWT. I have a UiBinder as follows:

      <g:MenuBar ui:field="subMenuBar" vertical="true">
           <g:MenuItem ui:field="menuItem">Home</g:MenuItem>
           <g:MenuItem ui:field="menuItemEdit">Edit</g:MenuItem>
         </g:MenuBar>
       </g:MenuItem>

and in code I want to be able to to disable or hide the menuItem based on some rules. e.g.

menuItem.setEnabled(false);
menuItem.setVisible(false);


On Friday, February 28, 2014 11:53:30 AM UTC, Ed wrote:
Please give more details so people can help you...
No idea what menu item is or what you are trying to do.
Tip: use your debugger to see what is actually happening... 
You probably aren't defining any styles that are set by your enable action.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment