DEFINE PRIVATE BUTTON buttonAUTO-GO AUTO-ENDKEYDEFAULTBGCOLOR expressionCONTEXT-HELP-ID expressionDCOLOR expressionDROP-TARGETFGCOLOR expressionFONT numberIMAGE-DOWN image-phraseIMAGE IMAGE-UP image-phraseIMAGE-INSENSITIVE image-phraseMOUSE-POINTER nameLABEL labelLIKE buttonPFCOLOR expressionsize-phraseNO-FOCUS FLAT-BUTTONNO-CONVERT-3D-COLORSTOOLTIP tooltiptrigger-phrasebuttonPRIVATE BUTTON
Note: BUTTON buttonBGCOLOR expressionCONTEXT-HELP-ID expressionDCOLOR expressionFGCOLOR expressionFONT numberSpecifies the font for the button label. The value number must be an expression that resolves to an integer value. That integer must be associated with a specific font in your system environment files.{IMAGE | IMAGE-UP } image-phraseThe IMAGE | IMAGE-UP image-phrase option is ignored in character interfaces.The syntax of image-phrase is as follows:
FILE nameIMAGE-SIZE IMAGE-SIZE-CHARS IMAGE-SIZE-PIXELSwidth BY heightFROM X n Y n ROW n COLUMN nFor more information on this syntax, see the Image phrase reference entry.IMAGE-DOWN image-phraseFor more information, see the Image phrase reference entry.IMAGE-INSENSITIVE image-phraseFor more information, see the Image phrase reference entry.MOUSE-POINTER nameSpecifies the mouse pointer for the button. The character value name is either the name of a predefined ABL pointer, or the name of a Windows .cur file that defines a pointer or an .ani file that contains an animated cursor.LABEL labelThe label displayed on the button. The name should describe the action invoked when the button is chosen. The value of label must be a string enclosed in quotes. The default label is the button name. If you use the LIKE button option and you do not use the LABEL option, the button inherits the label of the button you name.You can indicate a character within the label to be used as a navigation mnemonic in Windows. Indicate the character by preceding it with an ampersand (&). When the button is displayed, the mnemonic is underlined. The user can choose the button by pressing ALT and the underlined letter. If you specify more than one button with the same mnemonic, the AVM transfers focus to each of these in tab order when you make a selection.LIKE buttonIndicates the name of a defined button whose characteristics you want to use for a new button. If you name a button with this option, you must have defined that button earlier in the procedure. You can override the label, image, and on phrase by using the LABEL, IMAGE, and on-phrase options. If you do not use these options, the button takes on the characteristics of the button you name.PFCOLOR expression
width BY heightSIZE SIZE-CHARS SIZE-PIXELSIf you specify SIZE or SIZE-CHARS, the units are characters; if you specify SIZE-PIXELS, the units are pixels. For character units, the values width and height must be decimal constants; for pixel units, they must be integer constants. For more information, see the SIZE phrase reference entry.If no size is specified, the AVM calculates a default size for the button. This calculation adds the button’s border thickness (that is, the combination of 3D shadows and highlights, and the focus rectangle) to the up image size defined by the IMAGE | IMAGE-UP image-phrase option. However, the thickness of the border depends on whether the button has dual images (up and down images) and whether it is a FLAT-BUTTON or NO-FOCUS button.Table 28 explains how many pixels the image size expands based on the button size.
Table 28: NO-FOCUS FLAT-BUTTONTable 29 describes the conversion process.
Table 29: TOOLTIP tooltipYou can add or change the TOOLTIP option at any time. If TOOLTIP is set to "" or the Unknown value (?), then the ToolTip is removed from the button. No ToolTip is the default. ToolTips are supported in Windows only.For more information, see the Trigger phrase reference entry.
DEFINE BUTTON button-1 LABEL ’’Drop Here’’ DROP-TARGET.
On a character-based terminal, a button appears as the label enclosed in angle brackets (< >). The user can move the mouse pointer to the button by pressing TAB or arrow keys. The user can then choose the button by pressing SPACEBAR or RETURN.
You can specify an application-defined widget ID for a compile-time defined button widget using the form-item phrase in either the FORM statement or the DEFINE FRAME statement. See the FORM statement and DEFINE FRAME statement reference entries for more information.
In Windows, ABL supplies the following prepackaged images for the up, down, left, and right arrows: btn-up-arrow, btn-down-arrow, btn-left-arrow, and btn-right-arrow. Specify one of these items in place of a filename.
The AVM only performs the color conversion process on bitmaps (.bmp files) that contain 256 or fewer colors. However, you might consider using 16-color bitmaps because only the first sixteen entries in the bitmap’s color table will be converted.
Icon colors (.ico files) are not converted, even if CONVERT-3D-COLORS is TRUE. To ensure that an icon will be displayed properly on a button, draw icons with a transparent background.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |