Movatterモバイル変換


[0]ホーム

URL:


Wayback Machine
61 captures
26 Aug 2008 - 17 Nov 2025
MarAPRMay
02
201120122013
success
fail
COLLECTED BY
Organization:Internet Archive
The Internet Archive discovers and captures web pages through many different web crawls.At any given time several distinct crawls are running, some for months, and some every day or longer.View the web archive through theWayback Machine.
Web wide crawl with initial seedlist and crawler configuration from January 2012 using HQ software.
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20120402174040/https://developer.mozilla.org/en/XUL/button

Mozilla Developer Network

Mozilla

    button

    «XUL Reference home    [Examples |Attributes |Properties |Methods |Related ]

    A button that can be pressed by the user. Event handlers can be used to trap mouse, keyboard and other events. It is typically rendered as a grey outset rectangle. You can specify the label of the button using thelabel attribute or by placing content inside the button.

    More information is available in theXUL tutorial.

    Attributes
    accesskey ,autocheck ,checkState ,checked ,command ,crop ,dir ,disabled ,dlgtype ,group ,icon ,image ,label ,open ,orient ,tabindex ,type
    Properties
    accessKey ,accessibleType ,autoCheck ,checkState ,checked ,command ,crop ,dir ,disabled ,dlgType ,group ,image ,label ,open ,orient ,tabIndex ,type

    Examples

    Image:XUL_ref_button.png
    <button label="Press Me"        oncommand="alert('You pressed me!');"/>

    Attributes

    Inherited from XUL element
    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,noinitialfocus,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

    accesskey
    Type:character
    This should be set to a character that is used as a shortcut key. This should be one of the characters that appears in thelabel label for the element.
    autocheck
    Type:boolean
    If this attribute istrue or left out, the checked state of the button will be switched each time the button is pressed. If this attribute isfalse, the checked state must be adjusted manually. When autocheck is true, the button type should be "checkbox" or "radio".
    checkState
    Type:integer, values0,1, or2
    This attribute may be used to create three state buttons, numbered 0, 1 and 2. When in state 0 or 1, pressing the button will switch to the opposite state. When in state 2, pressing the button will switch to state 0. This means that the button acts like a checkbox except that there is a third state which must be set manually by adjusting the check state. If you wish to have different behavior for how the states are adjusted, set theautoCheck attribute tofalse and adjust the state with a script. Thetype attribute must be set tocheckbox for buttons with a check state. Constants for the possible values for this attribute are in thensIDOMXULButtonElement interface.
    checked
    Type:boolean
    Indicates whether the element is checked or not.
    UsehasAttribute() to determine whether this attribute is set instead ofgetAttribute().
    For buttons, thetype attribute must be set tocheckbox orradio for this attribute to have any effect.
    command
    Type:id
    Set to theid of acommand element that is being observed by the element.
    crop
    Type:one of the values below
    If the label of the element is too big to fit in its given space, the text will be cropped on the side specified by thecrop attribute. An ellipsis will be used in place of the cropped text. If the box direction is reversed, the cropping is reversed.
    start
    The text will be cropped on its left side.
    end
    The text will be cropped on its right side.
    left
    Deprecated The text will be cropped on its left side.
    right
    Deprecated The text will be cropped on its right side.
    center
    The text will be cropped in the middle, showing both the start and end of the text normally.
    none
    The text will be not be cropped using an ellipsis. However, the text will simply be cut off if it is too large. The side depends on the CSS text alignment.
    Depending on the platform and theme being used, some elements will have a set maximum width so they will be always appear cropped. If you wish to use the valuenone and the displayed text is larger than this maximum width, you may be able to use the max-width CSS property (or the maxwidth attribute) to override this size. For example, for a menuitem in a menu you can add the following CSS rule when you want to use the valuenone:
    menupopup > menuitem, menupopup > menu { max-width: none; }
    dir
    Type:one of the values below
    The direction in which the child elements of the element are placed.
    normal
    For scales, the scale's values are ordered from left to right (for horizontal scales) or from top to bottom (for vertical scales)  For other elements, the elements are placed left to right or top to bottom in the order they appear in the XUL code.
    reverse
    For scales, the scale's values are ordered from right to left (for horizontal scales) or from bottom to top (for vertical scales). For other elements, they are placed right to left or bottom to top. This is reverse of the order in which they appear in the XUL code.
    disabled
    Type:boolean
    Indicates whether the element is disabled or not. If this element is set totrue the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and thecommand event will not fire.
    Visible controls have adisabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.
    dlgtype
    Type:one of the values below
    The dialog type of the button, used only when the button is in a dialog box. You can use this feature to replace the standard dialog box buttons with custom buttons, yet the dialog event methods will still function. For example, if thedlgType is set toaccept, the button will replace the dialog box's accept button, which is usually labeledOK. Using this attribute on a button that is not in a dialog box has no effect. The following values can be used as the dialog type:
    accept
    The OK button, which will accept the changes when pressed.
    cancel
    The cancel button which will cancel the operation.
    help
    A help button for displaying help about the dialog.
    disclosure
    A button to show more information. This might be a button or a disclosure triangle.
    extra1
    An optional additional button.
    extra2
    A second optional additional button.
    group
    Type:string group nameNew inFirefox 3
    Buttons with type="radio" and the same value for their group attribute are put into the same group. Only one button from each group can be checked at a time. If the user selects one the buttons, the others in the group are unchecked.
    icon
    Mozilla 1.8
    Type:string
    This attribute should be used to set the usage for common buttons. Some platforms display these buttons with a small icon indicating their usage. This should be used in place of theimage attribute. Possible values include:accept,cancel,help,open,save,find,clear,yes,no,apply,close,print,add,remove,refresh,go-forward,go-back,properties,select-font,select-color,network. If you are using a button that matches one of these common usages, use theicon attribute to indicate this. Seethe appearance of the different icons on some available platforms.

     

    image
    Type:URI
    The URI of the image to appear on the element. If this attribute is empty or left out, no image appears. The position of the image is determined by thedir andorient attributes.
    label
    Type:string
    The label that will appear on the element. If this is left out, no text appears.
    open
    Type:boolean
    For themenutype buttons, theopen attribute is set totrue when the menu is open. Theopen attribute is not present if the menu is closed.
    orient
    Type:one of the values below
    Used to specify whether the children of the element are oriented horizontally or vertically. The default value depends on the element. You can also use the-moz-box-orient style property.
    horizontal
    Child elements of the element are placed next to each other in a row in the order that they appear in the XUL source.
    vertical
    Child elements of the element are placed under each other in a column in the order that they appear in the XUL source.
    tabindex
    Type:integer
    The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a highertabindex are later in the tab sequence.
    type
    Type:one of the values below
    The type of button. If this attribute is not present, a normal button is created. Leave the attribute out for a normal button.
    checkbox
    This type of button can be in two states. The user can click the button to switch between the states. This is not the same as a checkbox because it looks like a button.
    menu
    Set thetype attribute to the valuemenu to create a button with a menu popup. Place amenupopup element inside the button in this case. The user may click anywhere on the button to open and close the menu.
    menu-button
    You can also use the valuemenu-button to create a button with a menu. Unlike themenu type, this type requires the user to press the arrow to open the menu, but a different command may be invoked when the main part of the button is pressed.
    radio
    The button acts like a radio button. Only one button in the group can be on a once.
    repeat
    This button will fire its command event repeatedly while the mouse button is held down.New inFirefox 3

    Properties

    Inherited Properties
    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

    accessKey
    Type:character
    Gets and sets the value of theaccesskey attribute.
    accessibleType
    Type:integer
    A value indicating the type of accessibility object for the element.
    autoCheck
    Type:boolean
    Gets and sets the value of theautoCheck attribute.
    checkState
    Type:integer, values0,1, or2
    Gets and sets the value of thecheckState attribute.
    checked
    Type:boolean
    Gets and sets the value of thechecked attribute.
    command
    Type:element id
    Gets and sets the value of thecommand attribute.
    crop
    Type:string
    Gets and sets the value of thecrop attribute.
    dir
    Type:string
    Gets and sets the value of thedir attribute.
    disabled
    Type:boolean
    Gets and sets the value of thedisabled attribute.
    dlgType
    Type:string
    Gets and sets the value of thedlgType attribute.
    group
    Type:string group name
    Gets and sets the value of thegroup attribute.
    image
    Type:image URL
    Gets and sets the value of theimage attribute.
    label
    Type:string
    Gets and sets the value of thelabel attribute.
    open
    Type:boolean
    Gets and sets the value of theopen attribute.
    orient
    Type:string
    Gets and sets the value of theorient attribute.
    tabIndex
    Type:integer
    Gets and sets the value of thetabindex attribute.
    type
    Type:string
    Gets and sets the value of thetype attribute.

    Methods

    Inherited Methods
    addEventListener(),appendChild(),blur,click,cloneNode(),compareDocumentPosition,dispatchEvent(),doCommand,focus,getAttribute(),getAttributeNode(),getAttributeNodeNS(),getAttributeNS(),getBoundingClientRect(),getClientRects(),getElementsByAttribute,getElementsByAttributeNS,getElementsByClassName(),getElementsByTagName(),getElementsByTagNameNS(),getFeature,getUserData,hasAttribute(),hasAttributeNS(),hasAttributes(),hasChildNodes(),insertBefore(),isDefaultNamespace(),isEqualNode,isSameNode,isSupported(),lookupNamespaceURI,lookupPrefix,normalize(),querySelector(),querySelectorAll(),removeAttribute(),removeAttributeNode(),removeAttributeNS(),removeChild(),removeEventListener(),replaceChild(),setAttribute(),setAttributeNode(),setAttributeNodeNS(),setAttributeNS(),setUserData

    Tags(2)

    Edit tags

    Attachments(4)

    FileSizeDateAttached by 
     button_icon-Firefox-4.0-Linux_KDE-4.4.png
    button icon images available on Linux KDE
    26.17 kB11:39, 15 Jun 2011madarcheActions
     button_icon-Firefox-4.0-Mac_OS_X.png
    button icon images available on Mac OS X
    25.4 kB09:11, 22 Jun 2011madarcheActions
     button_icon-Firefox-4.0-Windows_XP.png
    button icon images available on Windows XP
    7.2 kB11:39, 15 Jun 2011madarcheActions
     button_icon_test.xul.txt
    The XUL file to create the screen capture of the different XUL button icon images on the different platforms
    1405 bytes13:22, 15 Jun 2011madarcheActions
    Images 3
    button icon images available on Linux KDE
    button icon images available on Linux KDEbutton_icon-Firefox-4.0-Linux_KDE-4.4.png
    button icon images available on Mac OS X
    button icon images available on Mac OS Xbutton_icon-Firefox-4.0-Mac_OS_X.png
    button icon images available on Windows XP
    button icon images available on Windows XPbutton_icon-Firefox-4.0-Windows_XP.png

    Attach file

    Page last modified09:58, 24 May 2011 bypippijn

    Message will close by itself in secondsMessage timer has been stopped

    Viewing Details:


    [8]ページ先頭

    ©2009-2026 Movatter.jp