T__ButtonAncestor Class

Should be used as your UI buttons ancestor.

Unit: _ButtonsAncestor
TFrame
  _ButtonsAncestor.T__ButtonAncestor
    cButtonRadio.TcadRadioButton
    cButtonText.TcadTextButton
type T__ButtonAncestor = class(TFrame)

The T__ButtonAncestor type exposes the following members.

Show:
 NameDescription
Create

Returns an instance of this class

Top
Show:
 NameDescription
IsDown

Manage the status of this button (False by default)

IsFocused

Manage the focus state of this button

IsUp

Manage the status of this button (True by default)

Text

The text shown on this button

TimeBetweenDownAndUpStatesWhenClicked

Sleeping time between Down and up states when the Click method is called. Value is in milliseconds, used by the sleep() instruction.

Top
Show:
 NameDescription
AfterConstruction

internal use, call it only if you override it in a descendant

BeforeDestruction

internal use, call it only if you override it in a descendant

Click

Called when the button is clicked. - activate the down status - wait for TimeBetweenDownAndUpStatesWhenClicked ms - activate the up status - call the onClick() event if it's not empty (you can override it but it's better to fill the onClick event)

DoTranslateTexts

FrameMouseDown

FrameMouseLeave

IsClickable

By default this function returns True if the onClick events is not nil

Repaint

Called to refresh the button on screen, override it in your descendants or it will crash !

ResetFocus

mostly internal use, change then IsFocused property is better

SetFocus

mostly internal use, change then IsFocused property is better

TranslateTexts

Where you can translate the text of your button (override and call it in your descendants)

Top

Override Repaint() method in your descendants or you'll get EAbstractError exceptions.