Class TMenuItemRadio

Unit

Declaration

type TMenuItemRadio = class(TMenuItemChecked)

Description

Menu radio item. Similar to TMenuItemChecked, but it belongs to a group and within this group only one (or none) radio button can be checked.

Note that AutoCheckedToggle property has a little different meaning in this class: whenever user will click on some item, it will be automatically set to Checked = True and the rest of items within this group will be set to Checked = False.

You can of course operate on Checked property explicitly, setting it to True or False.

Source: src/window/castlewindowmenu.inc (line 371).

Hierarchy

Overview

Methods

Protected procedure SetChecked(Value: boolean); override;
Protected procedure DoAutoCheckedToggle; override;
Public constructor Create(const ACaption: String; AIntData: Integer; AChecked, AAutoCheckedToggle: boolean); overload;
Public constructor Create(const ACaption: String; AIntData: Integer; const AKeyString: String; AChecked, AAutoCheckedToggle: boolean); overload;
Public constructor Create(const ACaption: String; AIntData: Integer; AKey: TKey; AChecked, AAutoCheckedToggle: boolean); overload;
Public destructor Destroy; override;

Properties

Public property Group: TMenuItemRadioGroup read FGroup write SetGroup;

Description

Methods

Protected procedure SetChecked(Value: boolean); override;

This item has no description. Showing description inherited from TMenuItemChecked.SetChecked.

Called when Checked property is assigned.

Source: src/window/castlewindowmenu.inc (line 377).

Protected procedure DoAutoCheckedToggle; override;

This item has no description. Showing description inherited from TMenuItemChecked.DoAutoCheckedToggle.

Called from DoClick when AutoCheckedToggle is True. It's supposed to actually implement the AutoCheckedToggle behavior.

Note that this is overriden ina a "dirty" way (i.e. not calling "inherited") in TMenuItemRadio descendant.

Source: src/window/castlewindowmenu.inc (line 378).

Public constructor Create(const ACaption: String; AIntData: Integer; AChecked, AAutoCheckedToggle: boolean); overload;

This item has no description.

Source: src/window/castlewindowmenu.inc (line 380).

Public constructor Create(const ACaption: String; AIntData: Integer; const AKeyString: String; AChecked, AAutoCheckedToggle: boolean); overload;

This item has no description.

Source: src/window/castlewindowmenu.inc (line 382).

Public constructor Create(const ACaption: String; AIntData: Integer; AKey: TKey; AChecked, AAutoCheckedToggle: boolean); overload;

This item has no description.

Source: src/window/castlewindowmenu.inc (line 384).

Public destructor Destroy; override;

This item has no description.

Source: src/window/castlewindowmenu.inc (line 387).

Properties

Public property Group: TMenuItemRadioGroup read FGroup write SetGroup;

The list of radio items within this group. This is never Nil.

Assigning this property is equivalent to adding yourself to the wanted group. I.e. Item.Group := NewGroup; is equivalent to NewGroup.Add(Item).

Source: src/window/castlewindowmenu.inc (line 394).


Generated by PasDoc 0.17.0.snapshot.