List Number Column Current Item (PRIM_LIST.NumberCurrentItem)

Provides access to the numeric value for the current list item

Ancestors - List Current Item (PRIM_LIST.CurrentItem) Object (PRIM_OBJT)

Details

CurrentItem is the item in the list that was last touched either by the mouse, keyboard or a LANSA list command such as SELECTLIST or GET_ENTRY.
 
When CurrentItem is set, the field values associated with the list definition will be returned to the component. This ensures that the field values for the last item are correct when the event is fired.
 
Care is required when relying on CurrentItem to identify the item last clicked. This will actually be the FocusItem and it won't change until another item is clicked.  CurrentItem however can be affected by a simple MouseOver.
 
Currentitem is best suited to processing directly related the list e.g. DoubleClick events or SELECTLIST.
 
When dealing with actions driven by external sources, for example a button click to process the last item, using FocusItem is recommended.
 
Using the FOR command to iterate over the items in a list will not affect CurrentItem.

Example

Using CurrentItem to set the image for the last item added to a list.
Add_Entry To_List(#List)
#List.CurrentItem.Image <= #Image1
Using CurrentItem in a SELECTLIST loop to hide zero values.
SelectList Named(#List)
 
   #ColumnSalary.CurrentItem.Visible := (#Salary <> 0)
 
EndSelect
Using the FOR command iterates over the items in their sorted sequence, but CurrentItem will not be set.
 
Use GET_ENTRY to set the CurrentItem to ensure field values are returned to the component.
For Each(#Item) in(#List.Items)
 
   Get_Entry Number(#Item.Entry) From_List(#List)
   * User processing here
 
EndFor

Properties

NameDescription
AutoSelectAutomatically select the text when the control receives focus
ComponentClassNameComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT)
ComponentMembersComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT)
ComponentPatternNameComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT)
ComponentTagGeneric space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT)
ComponentTypeComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT)
ComponentTypeNameComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT)
DisplayAlignmentDisplayAlignment sets edit box alignment when not in focus
EditAlignmentEditAlignment sets the alignment of the text when in focus
EnabledEnable or disable the list item Inherited from List Current Item (PRIM_LIST.CurrentItem)
HintHint to be shown for the current column/item Inherited from List Current Item (PRIM_LIST.CurrentItem)
HintPopupHintPopup to be shown for the current column/item Inherited from List Current Item (PRIM_LIST.CurrentItem)
HintTitleHint title to be shown for the current column/item Inherited from List Current Item (PRIM_LIST.CurrentItem)
IncrementIncrement specifies how the spin buttons adjust the value
MouseOverStyleStyle to be applied when the mouse enters the current column/item Inherited from List Current Item (PRIM_LIST.CurrentItem)
MouseOverStylesCollection of styles to be applied when the mouse enters the current column/item Inherited from List Current Item (PRIM_LIST.CurrentItem)
NameName identifies the component Inherited from Object (PRIM_OBJT)
NumericEditStyleNumericEditStyle controls insert and overtype data entry styles for numbers
OwnerOwner owns this component Inherited from Object (PRIM_OBJT)
ParentThe component instance to which this instance is attached. The visual container for a control or the collector of a set of child instances Inherited from Object (PRIM_OBJT)
PopupPopup to be shown for the current column/item Inherited from List Current Item (PRIM_LIST.CurrentItem)
ReadOnlyReadOnly controls whether the cell can be used for input
StyleStyle to be applied to the current column/item Inherited from List Current Item (PRIM_LIST.CurrentItem)
StylesCollection of styles to be applied to the current column/item Inherited from List Current Item (PRIM_LIST.CurrentItem)
ThemeDrawStyleThemeDrawStyle to be applied to the current item in the column Inherited from List Current Item (PRIM_LIST.CurrentItem)
ValueValue of the data class
VisibleShow or hide the list item Inherited from List Current Item (PRIM_LIST.CurrentItem)
WrapSet to true to start again when either end of the range is met

Events

NameDescription
CreateInstanceCreateInstance is signalled when an instance of a component is created Inherited from List Number Column Current Item (PRIM_LIST.NumberCurrentItem)
DestroyInstanceDestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from List Number Column Current Item (PRIM_LIST.NumberCurrentItem)

Methods

NameDescription
SetFocusSets focus to the currentitem in the list Inherited from List Current Item (PRIM_LIST.CurrentItem)

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2