T__ButtonAncestor Class
Definition
Should be used as your UI buttons ancestor.
type T__ButtonAncestor = class(TFrame)
- Inheritance
-
TFrameT__ButtonAncestor
- Derived
- Implements
Remarks
Override Repaint() method in your descendants or you'll get EAbstractError exceptions.
Constructors
| Create(TComponent) |
Returns an instance of this class |
Properties
| 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. |
Methods
| 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(TObject, TMessage) | |
| FrameMouseDown(TObject, TMouseButton, TShiftState, Single, Single) | |
| FrameMouseLeave(TObject) | |
| 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(string) |
Where you can translate the text of your button (override and call it in your descendants) |