[Overview][Resource strings][Constants][Types][Classes][Procedures and functions] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
The TWidget class is the base class of all user interface objects.
Source position: widget.inc line 167
type TWidget = class(TComponent) |
||
protected |
||
|
||
FText: String; |
|
|
|
||
FCanExpandHeight: Boolean; |
|
|
FCanExpandWidth: Boolean; |
|
|
FEnabled: Boolean; |
|
|
FVisible: Boolean; |
|
|
FOrigin: TPoint; |
|
|
|
||
FClientRect: TRect; |
|
|
|
||
|
||
|
||
|
||
|
||
procedure Loaded; override; |
|
|
procedure Click; dynamic; |
|
|
procedure Paint(); virtual; |
|
|
procedure SetParentComponent(); override; |
|
|
procedure CalcSizes; virtual; abstract; |
|
|
procedure Resized; virtual; |
|
|
function ProcessEvent(); virtual; |
|
Processes all incoming event objects |
function DistributeEvent(); virtual; |
|
Distributes event objects to it's children |
procedure EvFocusChanged; dynamic; |
|
|
procedure EvKeyPressed(); dynamic; |
|
|
procedure EvKeyReleased(); dynamic; |
|
|
procedure EvKeyChar(); dynamic; |
|
|
procedure EvTextChanged; dynamic; |
|
|
function DoMouseEnter(); |
|
|
function GetStyle; |
|
|
procedure SetCanExpandWidth(); |
|
|
procedure SetCanExpandHeight(); |
|
|
procedure SetText(); virtual; |
|
|
property CanExpandWidth: Boolean; [rw] |
|
|
property CanExpandHeight: Boolean; [rw] |
|
|
|
Specifies the image used to represent the mouse pointer when it passes into the region covered by the widget. |
|
property Text: String; [rw] |
|
|
property OnClick: TNotifyEvent; [rw] |
|
|
public |
||
constructor Create(); override; |
|
|
destructor Destroy; override; |
|
|
function SendEvent(); |
|
|
function FindForm; |
|
|
procedure SetEmbeddedParent(); |
|
|
procedure SetBounds(); |
|
|
function WidgetToClient(); virtual; |
|
|
function ClientToWidget(); virtual; |
|
|
function ClientToScreen(); virtual; |
|
|
procedure Show; dynamic; |
|
|
procedure Hide; dynamic; |
|
|
procedure Redraw(); |
|
|
procedure Scroll(); |
|
|
procedure SetFocus; |
|
|
procedure Update; |
|
|
|
||
property Origin: TPoint; [r] |
|
|
property BoundsSize: TSize; [r] |
|
|
property BoundsRect: TRect; [r] |
|
|
property Left: Integer; [r] |
|
|
property Top: Integer; [r] |
|
|
property Width: Integer; [r] |
|
|
property Height: Integer; [r] |
|
|
|
||
|
||
|
||
property ClientRect: TRect; [r] |
|
|
|
Sets or Gets the widget's GUI style |
|
property Enabled: Boolean; [rw] |
|
Controls whether the widget responds to mouse, keyboard and timer events. |
property Visible: Boolean; [rw] |
|
|
end; |
|
The TWidget class is the base class of all user interface objects. |
|
| | ||
TComponent |
||
? | ||
TObject |
Widgets are components that are normally visual and the user can see them and possibly interact with them at runtime. All widgets have properties, methods and events that describe aspects of their appearance, such as the position of the widget, the cursor or hint associated with the widget, methods to paint or move the widget and events that respond to user actions.
TWidget has many protected properties and methods that are used or published by its descendants.
If you want to use a TWidget to hold child widgets you will probably want to add a layout to the parent TWidget.
|
The fpGUI layout system provides a simple and powerful way of specifying the layout of child widgets |