|
home / documentation / reference / isvariablewidth
IsVariableWidth
- Description:
- Boolean value indicating whether the menu should be fixed or variable
width.
- Value:
- Boolean (true or false), Integer (1=true,
0=false), or JavaScript expression that returns a boolean value.
- Applies To:
- Menus.
- Browser Compatibility:
- IsVariableWidth is supported in all browsers.
- Comments:
- Variable width menus are automatically resized to be as wide as
the content of their menu items. If the menu is horizontal (IsHorizontal
is true) then each item is individually resized to the width of its
content. If the menu is vertical, the menu is sized to the width of its widest
menu item.
When a menu is variable width, its MenuWidth setting becomes the
maximum width of the menu. Additionally, supplying a
VariableWidthMinimum prevents HierMenus from shrinking any menu item
in a variable width menu to less than a minimum pixel size.
If VariableWidthMinimum is larger than MenuWidth, MenuWidth
will take precendence.
- Examples:
// Ok:
IsVariableWidth:true,
IsVariableWidth:0,
IsVariableWidth:(window.thisPage=="cf")?1:0,
// if the user defined variable "thisPage" is "cf",
// IsVariableWidth is true
// Incorrect:
IsVariableWidth:"false", // quotes not allowed around booleans
IsVariableWidth:"0",
IsVariableWidth:'(window.thisPage=="cf")?1:0', // no quoted expressions
- Default:
- true
- See Also:
-
MenuWidth,
VariableWidthMinimum
|