Page History
動的 HTML メニューバー・ウェブレットには、widthプロパティとheightプロパティがあります。加えて、menu itemデザイナで各メニュー項目の幅及び高さを指定することができます。以下は、これらの値が合わさってどうやってメニュー・バーや最上層のアイテム、ポップアップ・メニューのアイテムの幅や高さを決定するかのまとめです。これらの幅や高さの値は、ウェブレットのorientationプロパティで選択された値によっても変わります。
Width
ポップアップ・メニューのメニュー・アイテムについて、幅はmenu itemデザイナでそのポップアップの最初のアイテムに指定された幅によって決められます。ポップアップの全てのアイテムが同じ幅になります。ウェブレットのwidthプロパティで指定された値は、これらのアイテムの幅には影響を与えません。
最上層のメニューアイテム(ページに必ず表示されるもの)については、以下のように幅が決められます。
値がウェブレットのwidthプロパティに指定されている場合、全ての最上層のメニューアイテムにそれが適用されます。(各アイテムについて幅がmenu itemデザイナで指定されていたとしても、上書きします。)
そうでない場合は、幅はメニューの方向によって以下のように変わります。
- 水平方向の場合 (orientationプロパティに'top'が指定されている場合)、各最上層アイテムに指定された幅が尊重されます。(つまり、それぞれ異なることもありえます。)
- 垂直方向の場合 (orientationプロパティに‘left’もしくは‘right’が指定されている場合)、最初の最上層アイテムに指定された幅が最上層アイテムの全てに適用されます。(つまり、全てが同じ幅になります。)
Height
ポップアップ・メニューのメニュー・アイテムについては、各アイテムに指定された高さが適用されます。つまり、アイテムによって高さが異なることもありえます。これは、1つのポップアップ・メニューの中でもそうですし、複数のポップアップ・メニューにわたってもそうです。ウェブレットのheightプロパティで指定された値は、これらのアイテムの高さには影響を与えません。
最上層のメニュー・アイテム(ページに必ず表示されるもの)については、メニュー・アイテムの高さは以下のようにメニュー・バーの方向によって変わります。
- 垂直方向の場合 (orientationプロパティに‘left’もしくは‘right’が指定されている場合)、各最上層アイテムに指定された高さが尊重されます。(つまり、それぞれ異なることもありえます。)
- 水平方向の場合 (orientationプロパティに'top‘が指定されている場合)、最初の最上層アイテムに指定された高さが最上層アイテムの全てに適用されます。(つまり、全てが同じ高さになります。)
ウェブレットのheightプロパティに値が指定されている場合、メニュー・アイテムの高さが明らかに変わることはありません。(その値がメニュー・アイテムの目に見える境界の寸法になります。)言い換えれば、最上層のメニュー・アイテムはheightプロパティの値に関わらず同じ大きさに見えるということです。その代わり、heightプロパティはメニュー・バーの為に確保された垂直方向のスペースを定義します。つまり、メニュー・バーとそれに伴うページ要素を垂直方向に区切るのに影響を与えます。
heightプロパティの値を増やすと、メニュー・バーとそれに伴うページ要素の間のスペースを増やすことができます。
heightプロパティの値を減らすと、条件によってはメニュー・バーが明らかにページ要素に重なってしまうところまで、このスペースを減らすことができます。
heightプロパティに何も値が指定されていない場合は、ウェブレットは、最初のもしくは全ての最上層メニュー・アイテムの高さによってデフォルトのスペースの大きさを決めます。 最初のメニュー・アイテムを使用するか、全てを使用するかは、メニュー・バーの方向によって変わります。
The Dynamic HTML Menu bar weblet has width and height properties. In addition, you can specify the width and height of individual menu items in the menu item designer. Following is a summary of how these values work together to determine the width and height of the menu bar, the top-level items and the items in pop-up menus. The effect of these width and height values can also vary according to the chosen value for the orientation property of the weblet.
Width
For menu items in pop-up menus, the width is determined by the width specified in the menu item designer for the first item in that pop-up. All items in the pop-up have the same width. The value specified for the width property of the weblet does not affect the width of these items.
For the top-level menu items (those that are shown statically on the page), the width is determined as follows:
If a value is specified for the weblet width property, then it applies to all top-level menu items (it overrides the width that may have been specified in the menu item designer for individual items).
Otherwise, the width depends on the orientation of the menu bar as follows:
- When in horizontal orientation ('top' is specified for the orientation property) the widths specified for individual top-level items is respected (that is, they can be different).
- When in vertical orientation ('left' or 'right' is specified for the orientation property) the width specified for the first top-level item applies to all the top-level items (that is, they are all the same width).
Height
For menu items in pop-up menus, the height specified for individual items applies. That is the items can have different heights, both within one pop-up menu and across different pop-up menus. The value specified for the height property of the weblet does not affect the height of these items.
For the top-level menu items (those that are shown statically on the page), the menu item height depends on the orientation of the menu bar as follows:
- When in vertical orientation ('left' or 'right' is specified for the orientation property) the heights specified for individual top-level items is respected (that is, they can be different).
- When in horizontal orientation ('top' is specified for the orientation property) the height specified for the first top-level item applies to all the top-level items (that is, they are all the same height).
If a value is specified for the height property of the weblet, it does not alter the apparent height of the menu items (that is the dimensions of the visible boundary of the menu item). In other words, the top-level menu items appear to be the same size irrespective of the value of the height property. Instead, the height property specifies the vertical space reserved for the menu bar – that is, it affects the vertical spacing between the menu bar and following page elements.
By increasing the height property value you can increase the space between the menu bar and following page elements.
By decreasing the height property value you can decrease this space, even to the point that the menu bar can apparently overlap following page elements in some circumstances.
...