Back to Devexpress

TdxBarManager.GetItemsByCategory(Integer,TList) Method

vcl-dxbar-dot-tdxbarmanager-dot-getitemsbycategory-x28-system-dot-integer-system-dot-classes-dot-tlist-x29.md

latest2.3 KB
Original Source

TdxBarManager.GetItemsByCategory(Integer,TList) Method

Populates a list with the items in a particular category and returns a count of the items in the list.

Declaration

delphi
function GetItemsByCategory(ACategory: Integer; List: TList): Integer;

Parameters

NameType
ACategoryInteger
ListTList

Returns

Type
Integer

Remarks

This function clears the list passed as the List parameter and then populates it with the items of the category specified by the ACategory parameter. At runtime (the bar manager’s Designing property is set to False ), the list is populated only with items that are currently accessible to end-users (excluding TdxBarControlContainerItem items). Otherwise, the list is populated with all the items available in the specified category, as returned by the GetAllItemsByCategory function.

The GetItemsByCategory function returns the number of items within the list. If the specified category does not exist, the function returns 0 and an empty list.

Call the bar manager’s GetCountByCategory function to determine the number of items that are accessible to end-users within a certain category. To access all categories defined within the bar manager, use its Categories zero-based indexed collection.

See Also

TdxBarManager.GetAllItemsByCategory

TdxBarManager.GetItemByCategory

TdxBarManager.GetItemByName

TdxBarManager Class

TdxBarManager Members

dxBar Unit