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

TGroupBox

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

The TGroupBox widget provides a group box frame with a title

Declaration

Source position: groupbox.inc line 33

type TGroupBox = class(TCustomGroupBox)

published

  property CanExpandWidth;

  

  property CanExpandHeight;

  

  property Enabled;

  

  property Text;

  

end;

Inheritance

TGroupBox

  

The TGroupBox widget provides a group box frame with a title

|

TCustomGroupBox

  

|

TBinWidget

  

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

|

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

The TGroupBox widget provides a group box frame with a title. TGroupBox doesn't automatically lay out the child widgets (which are often TCheckBoxes or TRadioButtons but can be any widgets).

See also

TCheckBox

  

TRadioButton

  

Example

{ The following example shows how we can set up a TGroupBox with a layout }
  grpOne := TGroupBox.Create('Group Box 1', self);
  grpOne.CanExpandWidth := True;

  VBox1 := TBoxLayout.Create(self);
  VBox1.Orientation := Vertical;
  grpOne.InsertChild(VBox1);
  
  Radio1 := TRadioButton.Create('Radio button 1', self);
  Radio2 := TRadioButton.Create('Radio button 2', self);
  Radio3 := TRadioButton.Create('Radio button 3', self);

  Radio1.Checked := True;
  Radio1.CanExpandWidth := True;
  Radio2.CanExpandWidth := True;
  Radio3.CanExpandWidth := True;

  VBox1.InsertChild(Radio1);
  VBox1.InsertChild(Radio2);
  VBox1.InsertChild(Radio3);