[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Buttons' (#lcl)

GetButtonCaption

Gets the default caption for the specified button identifier.

Declaration

Source position: buttons.pp line 527

function GetButtonCaption(

  idButton: Integer

):string;

Arguments

idButton

  

Button identifier used to get the default caption from a resource string.

Function result

Default caption for the specified button.

Description

GetButtonCaption is a String function used to get the default caption for the numeric button identifier in idButton. The return value contains the resource string from the LCLStrConsts.pas unit for the value in idButton.

idButton contains one of the button identifiers defined in LCLType.pp, such as:

idButtonOk (1)
Returns the value in rsmbOK.
idButtonCancel (2)
Returns the value in rsmbCancel.
idButtonHelp (3)
Returns the value in rsmbHelp.
idButtonYes (4)
Returns the value in rsmbYes.
idButtonNo (5)
Returns the value in rsmbNo.
idButtonClose (6)
Returns the value in rsmbClose.
idButtonAbort (7)
Returns the value in rsmbAbort.
idButtonRetry (8)
Returns the value in rsmbRetry.
idButtonIgnore (9)
Returns the value in rsmbIgnore.
idButtonAll (10)
Returns the value in rsmbAll.
idButtonYesToAll (11)
Returns the value in rsmbYesToAll.
idButtonNoToAll (12)
Returns the value in rsmbNoToAll.
idButtonOpen (13)
Returns the value in rsmbOpen.
idButtonSave (14)
Returns the value in rsmbSave.
idButtonShield (15)
Returns the value in rsmbUnlock.

The return value is '?' if any other numeric value is passed in idButton.

GetButtonCaption is called when a value other than bkCustom is assigned to the Kind property in TCustomBitBtn.

See also

GetDefaultButtonIcon

  

Gets a scaled bitmap with the default glyph for the specified button identifier.


Version 3.2 Generated 2024-02-25 Home