在我的Flex应用程序中,在Grid中定义菜单栏。
如何为每个项目做分隔符?
如何展开(特定尺寸)整个窗口的菜单栏(即铬合金)?
实际上这是我的示例代码。
<Canvas id="canvas_afterLogin" width="100%" visible="false">
<Grid width="100%">
<GridRow id="header1" width="100%" horizontalAlign="center">
<GridItem horizontalAlign="left" width="100%">
<Image source="assets/sitsLogo.png" width="60" height="60"/>
</GridItem>
<GridItem width="100%">
<MenuBar id="myMenuBar0" width="100%"
borderColor="#C8DCF5" color="#000000"
cornerRadius="0" dataProvider="{xml}"
fontFamily="Arial" fontSize="14" fontStyle="normal"
fontWeight="normal" itemClick="myMenuBar_itemClickHandler(event)"
labelField="@label" themeColor="#06FC8B"/>
</GridItem>
<GridItem width="100%" horizontalAlign="right">
<Button height="22" label="Logout" click="logoutUser(event)"
color="#000000" fontSize="12" themeColor="#B0D2D4"/>
</GridItem>
</GridRow>
</Grid>
</Canvas>
和dataProvider xml
是
<XMLList id="xml">
<menuitem label="Home"/>
<menuitem label="Contacts">
<menuitem label="Find"/>
</menuitem>
<menuitem label="Profile">
</menuitem>
<menuitem label="Messages">
<menuitem label="DetailsSearch"/>
</menuitem>
<menuitem label="Classes">
<menuitem label="LiveView"/>
</menuitem>
<menuitem label="Reports">
<menuitem label="Money_Form"/>
</menuitem>
<menuitem label="Money" color="#112233">
<menuitem label="Receive_Founds"/>
</menuitem>
<menuitem label="Confilcts">
<menuitem label="Myconflicts"/>
</menuitem>
<menuitem label="Courses">
<menuitem label=""/>
</menuitem>
<menuitem label="eC9 Deck">
<menuitem label="Contact_Us"/>
</menuitem>
</XMLList>
请帮助我......如何为每个菜单分配分隔符?