mozilla
Os seus resultados da pesquisa

    scale

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

    Uma escala permite ao usuário selecionar um valor de uma faixa. Uma barra exibida horizontalmente ou verticalmente permite ao usuário selecionar um valor arrastando um ponteiro na barra.

    Use o atributo de orientação para especificar a orientação da escala. O valor padrão é <tt>horizontal</tt>, que exibe uma escala horizontal. Valores pequenos são para a esquerda e valores maiores para a direita. Configure o atributo orient para <tt>vertical</tt> para usar uma escala vertical.

    O usuário pode usar as teclas de flecha para incrementar ou decrementar o valor em uma unidade, ou as teclas de "page up" e "page down" para incrementar ou decrementar uma página, como especificado pelo atributo pageincrement. As teclas "home" e "end" configuram o valor da escala para os valores mínimo e máximo, respectivamente.

    Atributos
    disabled, increment, max, min, pageincrement, tabindex, value
    Propriedades
    disabled, max, min, increment, pageIncrement, tabIndex, value,
    Métodos
    decrease, decreasePage, increase, increasePage,

    Examples

    Escala horizontal:

    <scale min="1" max="10"/>
    

    Image:Controlguide-scale.png

    Escala vertical:

    <scale min="1" max="10" orient="vertical"/>
    

    Atributos

    disabled
    Type: boolean
    Indicates whether the element is disabled or not. If this element is set to true 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 the command event will not fire.
    Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.
    increment
    Type: integer
    The amount by which the curpos (for scroll bars) or value (for number boxes and scale) attribute changes when the arrows are clicked(or scales are dragged). The default value is 1.
    min
    Type: integer
    The minimum value the control's value may take. The default value is 0.

     

    Type: integer
    The maximum value that the scale or number box may be set to. The default value is 100 for scales and Infinity for number boxes.

     

    pageincrement
    Type: integer
    The amount by which the value of the curpos or value attribute changes when the tray of the scroll bar (the area in which the scroll bar thumb moves) is clicked, or when the page up or page down keys are pressed. The default value is 10.
    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 higher tabindex are later in the tab sequence.
    value
    Type: string
    The string attribute allows you to associate a data value with an element. It is not used for any specific purpose, but you can access it with a script for your own use. Be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) Use another attribute like "value2" or "data-myAtt" (as in the HTML5 draft), as XUL does not require validation (less future-proof); 2) Use setAttributeNS() to put custom attributes in a non-XUL namespace (serializable and future-proof); 3) Use setUserData() (future-proof and clean, but not easily serializable). For user editable menulist elements, the contents, as visible to the user, are read and set using the Menulist.value syntax. For those elements, setAttribute("value", myValue) and getAttribute("value") do not access or affect the contents displayed to the user.

     

    Propriedades

    disabled
    Type: boolean
    Gets and sets the value of the disabled attribute.
    increment
    Type: integer
    Gets and sets the value of the increment attribute.
    min
    Type: integer
    Gets and sets the value of the min attribute.
    max
    Type: integer
    Gets and sets the value of the max attribute.
    pageIncrement
    Type: integer
    Gets and sets the value of the pageincrement attribute.
    tabIndex
    Type: integer
    Gets and sets the value of the tabindex attribute.
    value
    Type: string
    Gets and sets the value of the value attribute. For textbox and user editable menulist elements, the contents, as visible to the user, are read and set using the Textbox.value and Menulist.value syntax.

     

    Métodos

    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

    decrease()
    Return type: no return value
    Decreases the value of the scale or number box by the increment.
    decreasePage()
    Return type: no return value
    Decreases the value of the scale by the pageincrement.
    increase()
    Return type: no return value
    Increases the value of the scale or number box by the increment.
    increasePage()
    Return type: no return value
    Increases the value of the scale by the page increment.

    Relacionado

    Interfaces
    nsIDOMXULControlElement

    Categorias

    Interwiki Language Links

    Etiquetas do documento e colaboradores

    Etiquetas: 
    Contributors to this page: Verruckt, Leandro Mercês Xavier
    Última atualização por: Verruckt,