# Interface ICefLabelButton

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFInterfaces

## Declaration

`type ICefLabelButton = interface(ICefButton)`

## Description

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

UNKNOWN

<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

- IInterface
- ICefBaseRefCounted
- ICefView
- ICefButton
- ICefLabelButton

## 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);`

### Properties

| `property Text : ustring read GetText write SetText;`

## Description

### Methods

| `function AsMenuButton: ICefMenuButton;`

Returns this LabelButton as a MenuButton or NULL if this is not a MenuButton.

###### Attributes

GUID['{A99FD4F3-7EE6-4796-8BF6-EC367D51EED8}']

| `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|.

### Properties

| `property Text : ustring read GetText write SetText;`
Returns the text shown on the LabelButton.

Generated by PasDoc 0.17.0.snapshot.