Carousel - FindItem Method

Executes the OnFind method on the design interface for all items

Member of Carousel (PRIM_CARO)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

PRIM_CARO.CarouselItem

Reference to the first design instance returning a positive result

Key

*Input

Variant

Value to be searched for

StartItem

*Input (Optional)

PRIM_CARO.CarouselItem

Reference to the item to use as the start of the Find

Details

The FindItem method calls the OnFind method on the Prim_Caro.iCarouselDesign interface implemented by the design instances.

If a True is returned by the design instance, the CarouselItem is returned as the Result.

FindItem processing will stop when an item is returned or no item is found.

Example

In this example the found items are given a style to highlight them.

     Mthroutine Name(Find)
Define_Map For(*Input) Class(#Prim_Alph) Name(#Key)

Define_Com Class(#prim_Caro.CarouselItem) Name(#FoundItem) Reference(*Dynamic)

Begin_Loop

#FoundItem <= #Carousel.FindItem( #Key #FoundItem )
Leave If(#FoundItem *Is *Null)

#FoundItem.Style <= #MyStyles&ltHighlight>

End_Loop

Endroutine

See also

All Component Classes

Technical Reference

  • No labels