pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger L. Whitcomb" <Roger.Whitc...@actian.com>
Subject RE: Simple button in MenuBar
Date Tue, 20 Nov 2012 22:44:30 GMT
Ah, I see what is happening.  In MenuBar.java at line 162 (inside
"isEnabled) it is checking for a null Menu item.  So, the MenuBar is
definitely assuming that every MenuBar.Item will itself contain a Menu.
I wonder what would happen if you were to define an empty Menu (as in
<Menu/>) underneath your MenuBar.Item .... Probably wouldn't be very
nice visually ....


I'm not sure how to suggest working around this otherwise....


~Roger Whitcomb


From: Joseph Paterson [mailto:joseph.paterson@gmail.com] 
Sent: Tuesday, November 20, 2012 2:32 PM
To: user@pivot.apache.org
Subject: Re: Simple button in MenuBar


Hi Roger,


The action is definitely enabled and works fine if it is contained
within an enclosing menu. My menu bar has plenty of MenuBar.Item with
menus within them which work fine, but what I want is to have a button
to access an action directly on the menu bar, not within a menu on the
menu bar (if that makes sense), a bit like a toolbar if you like.







On 21/11/2012, at 4:48 AM, "Roger L. Whitcomb"
<Roger.Whitcomb@actian.com> wrote:

Hi Joseph,

   I've never seen this before, and our application has a lot of menu
bar stuff.  Can you do some debugging or some debug printouts to verify
that the action has not been disabled by some other means?  What happens
if you change the action on this item to something else?


~Roger Whitcomb


From: Joseph Paterson [mailto:joseph.paterson@gmail.com] 
Sent: Saturday, November 17, 2012 11:08 PM
To: user@pivot.apache.org
Subject: Simple button in MenuBar


Hi all,


My application contains a MenuBar in which I would like to place a
simple button (to give easy access to a particular action), and I'm not
sure how to do this. I've got the following code:




      <MenuBar.Item action="refresh">


          <content:MenuItemData text="Refresh"





With the code above I do get something appearing in the menu bar, but it
is disabled (the "refresh" action is enabled).


Any help would be greatly appreciated!






View raw message