[Overview][Resource strings][Constants][Types][Classes][Procedures and functions] Reference for unit 'fpGUI' (#fpgui)

TContainerWidget

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TContainerWidget is an abstract class that defines the interface for containing other widgets

Declaration

Source position: container.inc line 23

type TContainerWidget = class(TWidget)

protected

  function DistributeEvent(); override;

  

Distributes Event objects to all children widgets

  function GetChildCount; virtual; abstract;

  

  function GetChild(); virtual; abstract;

  

  property ChildCount: Integer; [r]

  

  property Children: TWidget; [r]

  

  procedure InsertChild(); virtual; dynamic;

  

  procedure RemoveChild(); virtual; dynamic;

  

public

  function GetChildAt();

  

  function ContainsChild(); dynamic; abstract;

  

end;

Inheritance

TContainerWidget

  

TContainerWidget is an abstract class that defines the interface for containing other widgets

|

TWidget

  

The TWidget class is the base class of all user interface objects.

|

TComponent

?

TObject

Description

TContainerWidget is an abstract class that defines the interface for containing other widgets . It also implements the distribution of events to child widgets. You can't create an instance of this class, as it contains abstract methods, and doesn't actually define internally how to store references to child widgets. It purely defines the interface in doing so. This class is a decendant of TWidget and must be used as a base for container widgets. TLayout is an example of a container class that can hold multiple children. TBinWidget is an example of a container class that can hold only a single child widget - normally a TLayout descendant.

See also

TWidget

  

The TWidget class is the base class of all user interface objects.

TBinWidget

  

This is a concrete class that implements all the TContainerWidget's abstract methods

TLayout

  

The fpGUI layout system provides a simple and powerful way of specifying the layout of child widgets