Returns a value that indicates which buttons display images and which buttons display text on a RecordsetNavbar.
Syntax
object.getButtonStyles()
Parameters
Object
A RecordsetNavbar script object.
Remarks
A single value is returned that indicates the styles for all four buttons. The returned value is a sum of the values listed below.
Value | Constant | Style Description |
1 | RSNB_MASK_FIRSTIMAGE | First button displays a text caption. |
2 | RSNB_MASK_FIRSTCAPTION | First button displays an image. |
4 | RSNB_MASK_PREVIMAGE | Previous button displays a text caption. |
8 | RSNB_MASK_PREVCAPTION | Previous button displays an image. |
16 | RSNB_MASK_NEXTIMAGE | Next button displays a text caption. |
32 | RSNB_MASK_NEXTCAPTION | Next button displays an image. |
64 | RSNB_MASK_LASTIMAGE | Last button displays a text caption. |
128 | RSNB_MASK_LASTCAPTION | Last button displays an image. |
To set which buttons display images and which buttons display text, see setButtonStyles.
Example
The following JavaScript checks if the First button of the RecordsetNavbar has a caption. If it does, then the caption is changed.
function Button1_onclick()
{
nButtonMask = RecordsetNavbar1.getButtonStyles();
if ((nButtonMask & (RSNB_MASK_FIRSTCAPTION)) != 0)
{
// Button has a caption, so lets change it
RecordsetNavbar1.getButton(0).value = "First Record";
}
}