Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

titlebar

titlebar 要素で作成されたボックスは、通常ウィンドウのタイトルバーと同じように振る舞います。この要素がクリックされドラッグされるとウィンドウが移動します。この要素は、プラットフォーム固有の通常ウィンドウのタイトルバーを変更するために使用することはできません。代わりに、chromeless ウィンドウのためのカスタムタイトルバーを作成するために使用できます。titlebar が panel 要素内にある場合、これをドラッグするとパネルが移動します。

titlebar 要素内の要素は通常、いかなるマウスイベントも受け取りません。つまり、この要素内のボタンはクリックすることができず、この要素内のテキストボックスにマウスでフォーカスすることもできません。この動作を望まない場合は、titlebar 要素に allowevents="true" を設定して既定の動作を上書きしてください。

titlebar は、移動が完了した後、command イベントを送ります。

この XUL ファイルは、マウスで移動可能な HUD スタイルのウィンドウを作成します。マウスボタンを離すと閉じられます。

<?xml version="1.0"?>
<window title="Movable HUD Window"
        xmlns="https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        width="300" height="200"
        style="background: transparent; -moz-appearance: none;">
  <titlebar flex="1" oncommand="close()"
            style="background: rgba(30, 30, 30, 0.9);
                   -moz-border-radius: 10px;
                   -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
                   margin: 8px 12px 16px;"/>
</window>

このファイルは、エラーコンソールから次のようすると開けます (ファイルへのパスは適切なものに変更してください): open("file:///Users/markus/Sites/hudwindow.xul", "", "chrome=1, titlebar=0")

属性

XUL 要素からの継承
align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width

註: allowevents 属性は Firefox 3 以前のタイトルバーで動作しませんでした。

プロパティ

XUL 要素からの継承
align, attributes, allowEvents, baseURI, boxObject, builder, childElementCount, childNodes, children, className, clientHeight, clientLeft, clientTop, clientWidth, collapsed, contextMenu, controllers, database, datasources, dir, firstChild, firstElementChild, flex, height, hidden, id, lastChild, lastElementChild, left, localName, maxHeight, maxWidth, menu, minHeight, minWidth, namespaceURI, nextElementSibling, nextSibling, nodeName, nodeType, nodeValue, observes, ordinal, orient, ownerDocument, pack, parentNode, persist, prefix, previousElementSibling, previousSibling, ref, resource, scrollHeight, scrollLeft, scrollTop, scrollWidth, statusText, style, tagName,textContent, tooltip, tooltipText, top, width

メソッド

関連項目

TBD

ドキュメントのタグと貢献者

 このページの貢献者: Marsf
 最終更新者: Marsf,