[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Address of the routine used to get default glyphs for TBitBtn instances.
Source position: buttons.pp line 518
var GetDefaultBitBtnGlyph: TGetDefaultBitBtnGlyph = Nil; |
GetDefaultBitBtnGlyph is a TGetDefaultBitBtnGlyph variable with the address for the routine used to get the default glyphs for TBitBtn instances in the application.
Kind is a TBitBtnKind argument that identifies the content needed in the bitmap returned from the function.
Handled is a Boolean value which indicates if the TBitmap instance was successfully created and loaded in the routine.
Create a function using the signature in TGetDefaultBitBtnGlyph, and assign it the variable to use custom bitmaps for the glyphs in TBitBtn. For example:
// provides Ok and Cancel glyphs function GetCustomBitBtnGlyph(Kind: TBitBtnKind; Handled: Boolean): TBitmap; begin if Kind in [bkOK, bkCancel] then begin Result := TBitmap.Create; case Kind of bkOk: Result.Assign(MyOkGlyph); bkCancel: Result.Assign(MyCancelGlyph); end; end else Result := Nil; Handled := (Result <> Nil); end; // assign the routine to the GetDefaultBitBtnGlyph variable Buttons.GetDefaultBitBtnGlyph := @GetCustomBitBtnGlyph;
|
TGetDefaultBitBtnGlyph - generic method to return a default Bit Button Glyph of specified Kind. |
Version 3.2 | Generated 2024-02-25 | Home |