Chapter 29: Customizing Access Ribbons
1039
The XML code for the separators in Figure 29.24 is
<group id=“grpCustomers” label=“Customers”>
<button id=“cmdNewReservation” ...
<separator id=“sep2”/>
<button id=“cmdAddCustomer” label=“Add” ...
<button id=“cmdViewCustomers” label=“View All”
<button id=“cmdFavorites” label=“Favorites” ...
<separator id=“sep3”/>
<button id=“cmdMailings” label=“Generate Mailings”...
</group>
The XML statements have been shortened to make it easier to see the separator placement. grp-
Customers contains two separators.
The only requirement for separators is that each be assigned a unique ID value.
Check boxes
Check boxes are effective to allow the user to select any of a number of different options. Check
boxes are not mutually exclusive, so the user can choose any of the check boxes within a group
without affecting other selections.
Check boxes are established much like any other ribbon control:
<tab id=“tabOutdoor” label=“Outdoor”>
<group id=“grpSports” label=“Sports” ...>
<check box id=“chk04” label=“Baseball” .../>
<check box id=“chk05” label=“Basketball” .../>
<separator id=“sep1”/>
<check box id=“chk06” label=“Tennis” .../>
<check box id=“chk07” label=“Water Polo” .../>
</group>
<group id=“grpCamping” label=“Camping Supplies”>
<check box id=“chk08” label=“Tent” .../>
<check box id=“chk09” label=“Granola” .../>
<check box id=“chk10” label=“Lantern” .../>
<separator id=“sep2”/>
<button id=“btn” imageMso=“StartTimer”
size=“large” label=“A Big Button” />
</group>
</tab>
We removed code and replaced it with ellipsis characters to improve clarity of this example XML.
The tab produced by this XML code is shown in Figure 29.25 and is included in the Simple2
example ribbon in the Chapter29.accdb database.