TSdlTrayEntry
An entry on a system tray object.
Definition
Unit: Neslib.Sdl3.Additional
Properties
Name | Description |
---|---|
Caption | The caption of the entry, or empty if the entry is a separator. |
IsChecked | Whether or not the entry is checked. |
IsEnabled | Whether or not an entry is enabled. |
Parent | The menu containing the tray entry. |
Submenu | Gets a previously created tray entry submenu. |
Events
Name | Description |
---|---|
OnSelect | A callback to be invoked when the entry is selected. |
Operators
Name | Description |
---|---|
Equal(TSdlTrayEntry, TSdlTrayEntry) | Used to compare against another TSdlTrayEntry. |
Equal(TSdlTrayEntry, Pointer) | Used to compare against nil . |
Implicit | Used to set the value to nil . |
NotEqual(TSdlTrayEntry, TSdlTrayEntry) | Used to compare against another TSdlTrayEntry. |
NotEqual(TSdlTrayEntry, Pointer) | Used to compare against nil . |
Methods
Name | Description |
---|---|
Click | Simulate a click on the tray entry. |
CreateSubmenu | Create a submenu for the system tray entry. |
Remove | Removes this tray entry. |
Property Descriptions
Caption
The caption of the entry, or empty if the entry is a separator.
An entry cannot change between a separator and an ordinary entry; that is, it is not possible to set a non-empty caption on an entry that has an empty caption (separators), or to set an empty caption to an entry that has a non-empty caption. It will silently fail if that happens.
property Caption: String read GetCaption write SetCaption
Type: String
See Also
Remarks
This property should be used on the thread that created the tray.
IsChecked
Whether or not the entry is checked.
The entry must have been created with TSdlTrayEntryFlag.Checkbox.
property IsChecked: Boolean read GetIsChecked write SetIsChecked
Type: Boolean
See Also
Remarks
This property should be used on the thread that created the tray.
IsEnabled
Whether or not an entry is enabled.
property IsEnabled: Boolean read GetIsEnabled write SetIsEnabled
Type: Boolean
See Also
Remarks
This property should be used on the thread that created the tray.
Parent
The menu containing the tray entry.
property Parent: TSdlTrayMenu read GetParent
Type: TSdlTrayMenu
See Also
Remarks
This property should be used on the thread that created the tray.
Submenu
Gets a previously created tray entry submenu.
You should have called CreateSubmenu. This property allows you to fetch it again later.
This property does the same thing as TSdlTray.Menu, except that it works on a TSdlTrayEntry instead of a TSdlTray.
A menu does not need to be destroyed; it will be destroyed with the tray.
property Submenu: TSdlTrayMenu read GetSubmenu
Type: TSdlTrayMenu
See Also
Remarks
This property should be used on the thread that created the tray.
Event Descriptions
OnSelect
A callback to be invoked when the entry is selected.
property OnSelect: TSdlTrayCallback write SetOnSelect
Type: TSdlTrayCallback
See Also
Remarks
This property should be used on the thread that created the tray.
Operator Descriptions
Equal(TSdlTrayEntry, TSdlTrayEntry)
Used to compare against another TSdlTrayEntry.
class operator Equal(const ALeft, ARight: TSdlTrayEntry): Boolean; inline; static
Parameters
ALeft
: TSdlTrayEntry
ARight
: TSdlTrayEntry
Returns
Boolean
Equal(TSdlTrayEntry, Pointer)
Used to compare against nil
.
class operator Equal(const ALeft: TSdlTrayEntry; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TSdlTrayEntry
ARight
: Pointer
Returns
Boolean
Implicit(Pointer)
Used to set the value to nil
.
class operator Implicit(const AValue: Pointer): TSdlTrayEntry; inline; static
Parameters
AValue
: Pointer
Returns
NotEqual(TSdlTrayEntry, TSdlTrayEntry)
Used to compare against another TSdlTrayEntry.
class operator NotEqual(const ALeft, ARight: TSdlTrayEntry): Boolean; inline; static
Parameters
ALeft
: TSdlTrayEntry
ARight
: TSdlTrayEntry
Returns
Boolean
NotEqual(TSdlTrayEntry, Pointer)
Used to compare against nil
.
class operator NotEqual(const ALeft: TSdlTrayEntry; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TSdlTrayEntry
ARight
: Pointer
Returns
Boolean
Method Descriptions
Click
Simulate a click on the tray entry.
procedure Click; inline
Remarks
This method should be called on the thread that created the tray.
CreateSubmenu
Create a submenu for the system tray entry.
This should be called at most once per tray entry.
This function does the same thing as TSdlTray.CreateMenu, except that works on a TSdlTrayEntry instead of a TSdlTray.
A menu does not need to be destroyed; it will be destroyed with the tray.
function CreateSubmenu: TSdlTrayMenu; inline
Returns
TSdlTrayMenu
: The newly created menu.
See Also
Remarks
This method should be called on the thread that created the tray.
Remove
Removes this tray entry.
procedure Remove; inline
See Also
Remarks
This method should be called on the thread that created the tray.