Skip to main content

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

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

Parameters

Name Type
ACategory Integer
List TList

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