home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / olbox100.zip / README < prev    next >
Text File  |  1999-06-08  |  3KB  |  129 lines

  1. Listbox in OREXX
  2. 1999 (C) Antal Koos
  3. -------------------
  4.  
  5. This is a free software.
  6. This software is WITHOUT ANY WARRANTY and you use it AT YOUR OWN RISK.
  7. The author is not liable for any damages arising out of using the software.
  8. You must agree to these terms or DO NOT USE this software.
  9.  
  10.  
  11. VERSION
  12. -------
  13.  0.98    The 1st release.
  14.  
  15.  0.99   Methods 'SetDefaultItem','SetHeight' are corrected.
  16.  
  17.  1.00   Multiply selection supported.New methods: SetMulSelection,GetFirstSelected,
  18.         GetnextSelected.
  19.         WARNING:The return value of the 'Execute' method are changed!
  20.  
  21.  
  22.  
  23. METHODS:
  24. --------
  25.  lb=Init( list.[,nlines][,x][,y][,width])
  26.  ----------------------------------------
  27.  
  28.  list.0 = the number of item strings
  29.  list.1 ... = the item strings
  30.  nlines = the number of the visible lines
  31.  x, y   =  upper left coordinate
  32.  width  = the displayed length of item strings
  33.  
  34.  Init returns egy OLBOX object.
  35.  
  36.  
  37.  str=lb~LibVersion
  38.  -----------------
  39.  Returns the version string.
  40.  
  41.  
  42.  idx=lb~String
  43.  -------------
  44.  Returns the last selected item number.
  45.  
  46.  
  47.  lb~SetCorner( x, y)
  48.  -------------------
  49.  Set the listbox upper left position.
  50.  
  51.  
  52.  lb~SetList( list.[,width])
  53.  --------------------------
  54.  Set the listbox items and width.
  55.  
  56.  
  57.  list.= lb~GetList
  58.  -----------------
  59.  Returns a copy of the listbox strings.
  60.  
  61.  
  62.  lb~SetHeight( nlines)
  63.  ---------------------
  64.  Set the number of the visible lines.
  65.  
  66.  
  67.  rtcd=lb~Execute
  68.  ------------------
  69.  Runs the listbox process.
  70.  Returns: .true/.false if the pressed key was Enter/Esc.
  71.  On pressing Esc all the selected items will be deselected.
  72.  
  73.  
  74.  lb~Refresh
  75.  ----------
  76.  Refresh the displayed listbox.
  77.  
  78.  
  79.  lb~SetDefaultItem( def)
  80.  -----------------------
  81.  Set the default selected item.
  82.  
  83.  
  84.  lb~SetUserFunc( key, cstr)
  85.  --------------------------
  86.  Set instructions to be executed when a key pressed.
  87.  The cstr can be one or more REXX instruction which will be executed by the
  88.  INTERPRET command. You can make a reference to LD. ( Listbox Descriptor) and 
  89.  item. (item.0= number of items, item.1= the 1st string) structures.
  90.  The displayed listbox will be refreshed if the following is implied in cstr:
  91.  'refresh=.true'
  92.  See TMENU.CMD and PKEY.CMD for more info!
  93.  
  94.  
  95.  lb~UnsetUserFunc( key)
  96.  ----------------------
  97.  Reset the (key,cstr) pair.
  98.  
  99.  
  100.  lb~Sort
  101.  -------
  102.  Simple sorting for the listbox strings.
  103.  
  104.  
  105.  lb~SetMulSelection( flag [,skey])
  106.  ---------------------------------
  107.  Enables or disables the multiply selection mode and set the selection key.
  108.  If flag is .true then multiply selection enabled otherwise disabled.
  109.  The default value is disabled.
  110.  Skey is the selection key; the default is Space.
  111.  
  112.  
  113.  found.=lb~GetFirstSelected
  114.  --------------------------
  115.  Get the first selected item.
  116.  found.index = the item number; found.str = the item string.
  117.  Found.index is 0 if none is selected.
  118.  
  119.  
  120.  found.=lb~GetNextSelected
  121.  -------------------------
  122.  Get the next selected item.
  123.  found.index = the item number; found.str = the item string.
  124.  Found.index is 0 if there are no more selected items.
  125.  
  126. -----------------------------------------------------------------------------------
  127. Contact: akoos@mvm.hu
  128.  
  129.