Show TOC Welcome to the QLIB 1.0 Online Reference
QLIB 

QButtonRes


Requires:
<script language="JavaScript" src="js/qlib/buttonres.js"></script>

Description

Defines resources for a button control. QLIB brings up four styles of a button control: normal button, checkbox, web-button and signal (see QButton control for more details and the demos). There're three states defined for a button: released, pressed and disabled. For both released and pressed states different images must be provided. Image for disabled state is optional. Usually the last state is represented by a dimmed version of the released state image. All images should have the same dimensions.

See Also

QButton control, Different buttons in action.

Constructor

QButtonRes(style, width, height, normal, pressed, disabledopt)
Creates new button resource.
Parameters
style - Style of the button (see QButton class constants for details).
width - Width of the button (in pixels).
height - Height of the button (in pixels).
normal - URL of "normal" state picture.
pressed - URL of "pressed" state picture.
disabled - Optional. URL of "disabled" state picture (this picture should be a dimmed version of one for normal state).

Properties

PropertyAccessDescription
styleRStyle of the button.
widthRWidth of the button (in pixels).
heightRHeight of the button (in pixels).
imgNRRefers to Image object of normal state.
imgPRRefers to Image object of pressed state.
imgDRRefers to Image object of disabled state (if any, null otherwise).