%HI_GetSelectedItem, %HI_SetSelectedItem functions


FunctionThe function %HI_SetSelectedItem sets the item of the Windows control of the List box or Tree view types or the displayer of Browser type as the current (selected) one (Control function).

The function %HI_GetSelectedItem detects the index (from 1 ...) of the current (selected) item of the Windows control of List box or Tree view types or the displayer of the Browser type.
Declaration
 %HI_SetSelectedItem(
  INT in refId,
 INT in itemIdx,
 BOOL in bInCurrPage := @FALSE
 BOOL in bState := @TRUE
  )


 INT %HI_GetSelectedItem(
  INT in refId,
 BOOL in bInCurrPage := @FALSE
 INT in iFromIdx := 0
  ) 
Parameters
refIdReference to graphic object (reference variable).
itemIdxItem index.
bInCurrPageThe parameter can be only used for displayer of Browser type:
  • @TRUE - the parameter itemIdx defines the item index on the currently displayed page of the Browser  
  • @FALSE - the parameter itemIdx defines the item index regardless of the paging (within the frame of the entire Browser)
bStateThe parameter can be only used for displayer of Browser type:
  • @TRUE - the line is to be selected
  • @FALSE - the line is to be deselected
iFromIdxThe parameter can only be used if the browser is in multiselect mode - it sets the index, from which the selected line will be looked for.

Example: If the selection comprises lines 1, 3 and 5 and the iFromIdx parameter is set to the value of 3, the function returns 5.
NoteIf no item is selected, the function %HI_GetSelectedItem returns the value of 0.

For displayer of Tree view type, the parameter itemIdx is the unique identifier of the item.

If the function %HI_SetSelectedItem is called on some item in Tree which is out of displayed area, the scrollbars will adjust automatically to see the selected item.


0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .