pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pavan vadavalli <pavan.vadava...@gmail.com>
Subject Context Menu with Multiple Selections
Date Wed, 26 Sep 2012 10:36:09 GMT
Hi,
I want to create a control like attached. Basically a context Menu with 
Multiple Items that can be selected and deselected.

when the following Menu Section is created (basically a lift from 
Context menu example from Kitchen Sink), i am able to have each Button 
as individual selectable items, but once the option is selected, the 
option doesn't switch off.
I tried to listen to the butttonPressListner and wanted to toggle 
selected State, but all through the listen events i always got Selected 
as true.

I see that something similar is done in the List box with  multiple
Need quick help, Please.


<Menu.Section xmlns:bxml="http://pivot.apache.org/bxml"
     xmlns="org.apache.pivot.wtk">
     <bxml:define>
         <ButtonGroup bxml:id="imageMenuGroup"/>
     </bxml:define>
     <bxml:define>
         <ButtonGroup bxml:id="imageMenuGroup1"/>
     </bxml:define>
      <bxml:define>
         <ButtonGroup bxml:id="imageMenuGroup2"/>
     </bxml:define>
<!-- $imageMenuGroup -->
     <Menu.Item  bxml:id="button1" buttonData="IMG_0725_2.jpg" 
toggleButton="true"
         buttonGroup="$imageMenuGroup" action="selectImageAction">
         <userData image="IMG_0725_2.jpg"/>
     </Menu.Item>
     <Menu.Item  bxml:id="button2" buttonData="IMG_0735_2.jpg" 
toggleButton="true"
         buttonGroup="$imageMenuGroup1" action="selectImageAction">
         <userData image="IMG_0735_2.jpg"/>
     </Menu.Item>
     <Menu.Item  bxml:id="button3" buttonData="IMG_0767_2.jpg" 
toggleButton="true"
         buttonGroup="$imageMenuGroup2" action="selectImageAction">
         <userData image="IMG_0767_2.jpg"/>
     </Menu.Item>
</Menu.Section>

Thanks and Regards,
Pavan

Mime
View raw message