# Class TCefLabelButtonRef

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFLabelButton

## Declaration

`type TCefLabelButtonRef = class(TCefButtonRef, ICefLabelButton)`

## Description

LabelButton is a button with optional text and/or icon. Methods must be called on the browser process UI thread unless otherwise indicated.

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/views/cef_label_button_capi.h">CEF source file: /include/capi/views/cef_label_button_capi.h (cef_label_button_t))

## Hierarchy

- TInterfacedObject
- TCefBaseRefCountedRef
- TCefViewRef
- TCefButtonRef
- TCefLabelButtonRef

## Overview

### Methods

| `function AsMenuButton: ICefMenuButton;`
| `procedure SetText(const text_: ustring);`
| `function GetText: ustring;`
| `procedure SetImage(button_state: TCefButtonState; const image: ICefImage);`
| `function GetImage(button_state: TCefButtonState): ICefImage;`
| `procedure SetTextColor(for_state: TCefButtonState; color: TCefColor);`
| `procedure SetEnabledTextColors(color: TCefColor);`
| `procedure SetFontList(const font_list: ustring);`
| `procedure SetHorizontalAlignment(alignment: TCefHorizontalAlignment);`
| `procedure SetMinimumSize(const size_: TCefSize);`
| `procedure SetMaximumSize(const size_: TCefSize);`
| `class function UnWrap(data: Pointer): ICefLabelButton;`
| `class function CreateLabelButton(const delegate: ICefButtonDelegate; const text: ustring): ICefLabelButton;`

## Description

### Methods

| `function AsMenuButton: ICefMenuButton;`
Returns this LabelButton as a MenuButton or NULL if this is not a MenuButton.

| `procedure SetText(const text_: ustring);`
Sets the text shown on the LabelButton. By default |text| will also be used as the accessible name.

| `function GetText: ustring;`
Returns the text shown on the LabelButton.

| `procedure SetImage(button_state: TCefButtonState; const image: ICefImage);`
Sets the image shown for |button_state|. When this Button is drawn if no image exists for the current state then the image for CEF_BUTTON_STATE_NORMAL, if any, will be shown.

| `function GetImage(button_state: TCefButtonState): ICefImage;`
Returns the image shown for |button_state|. If no image exists for that state then the image for CEF_BUTTON_STATE_NORMAL will be returned.

| `procedure SetTextColor(for_state: TCefButtonState; color: TCefColor);`
Sets the text color shown for the specified button |for_state| to |color|.

| `procedure SetEnabledTextColors(color: TCefColor);`
Sets the text colors shown for the non-disabled states to |color|.

| `procedure SetFontList(const font_list: ustring);`
Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", where: - FONT_FAMILY_LIST is a comma-separated list of font family names, - STYLES is an optional space-separated list of style names (case-sensitive "Bold" and "Italic" are supported), and - SIZE is an integer font size in pixels with the suffix "px". Here are examples of valid font description strings: - "Arial, Helvetica, Bold Italic 14px" - "Arial, 14px"

| `procedure SetHorizontalAlignment(alignment: TCefHorizontalAlignment);`
Sets the horizontal alignment; reversed in RTL. Default is CEF_HORIZONTAL_ALIGNMENT_CENTER.

| `procedure SetMinimumSize(const size_: TCefSize);`
Reset the minimum size of this LabelButton to |size|.

| `procedure SetMaximumSize(const size_: TCefSize);`
Reset the maximum size of this LabelButton to |size|.

| `class function UnWrap(data: Pointer): ICefLabelButton;`
Returns a ICefLabelButton instance using a PCefLabelButton data pointer.

| `class function CreateLabelButton(const delegate: ICefButtonDelegate; const text: ustring): ICefLabelButton;`
Create a new LabelButton. A |delegate| must be provided to handle the button click. |text| will be shown on the LabelButton and used as the default accessible name.

Generated by PasDoc 0.16.0-snapshot.