<p><b><font color="white">About the Sample:</b></td>
</tr>
<tr>
<td width=10></td>
<td><font color="white">
<p>
This sample demonstrates how the appearance of the menu can be customized with graphics, and how those graphics can contain transparent regions.
<p>
The graphics with the rounded corners are placed by creating an <b>Item</b> and setting it's <b>Style</b> property to 1 (Divider). Normally, dividers are simple colored lines and are placed between Items. In this case, the Divider has been placed at the beginning or end of the <b>Items</b> collection and the <b>DividerImage</b> property has been set so that it maps to our rounded corner graphic.
<p>
This also has the effect of enforcing a minimum width on the rest of the menu because each group cannot be smaller than it's largest Item, in this case, the <b>DividerImage</b>. If you wanted to set a minimum width on a group, but not show a graphic, then you could use a transparent GIF file that is the desired width.
<p>
Each of the Items which contain hyperlinks have had their <b>BackgroundImage</b> property set to a 1px high gradient graphic which tiles behind the <b>Caption</b>. The <b>BackgroundImage</b> on the <b>Group</b> object could not be used in this case because it would show through in the rounded corner graphic transparent areas.
<p>
For positioning, the menu makes use of the offset feature. If the menu appeared in it's automatic location, just below the "File" or "Edit" tabs, it would cover a portion of the green line going across the page. Instead the menus are offset 2 pixels down using a parameter of the client-side <b>cswmShow()</b> function.
<p>
This sample also contains a demonstration of disabling an Item. The "Paste" Item in the "Edit" Group has had it's <b>Enabled</b> property set to false. This nullifies any action associated with the Item without requiring you to make any other changes to it's properties. All disabled Items have their text color set by the <b>DisabledTextColor</b> property on the Main object.
<p>
Finally, there is also a demonstration of using the <b>SelectedColor</b> override on a Group object. The "Open" nested Group in the "File" Group has had it's <b>SelectedColor</b> property set to "yellow".
</td>
</tr>
<tr>
<td colspan=2>
<p><b><font color="white">View the Code:</b></td>
</tr>
<tr>
<td width=10></td>
<td><font color="white">
<p>
The code for this sample is available in the product installation directory:
<ul>
<li><b>CustomImages.wms</b> - The WebMenu Studio project file.
<li><b>CustomImages.wmt</b> - The Preview template used by the Studio's Live Preview window.
<li><b>default.htm (this file)</b> - Uses the WebMenu compiled output and discusses the sample.
<li><b>./includes/*</b> - The WebMenu output compiled from the studio application.
<li><b>./images/*</b> - The images used in this sample.