home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 11 / CDACTUAL11.iso / cdactual / demobin / share / os2 / VPREVAL / ATTPROC._ / CLICK next >
Encoding:
Text File  |  1995-08-16  |  3.4 KB  |  144 lines

  1. arg window
  2.  
  3. numofa=0
  4. numofs=0
  5. numofh=0
  6. numofr=0
  7.  
  8. /* Get indexes of all selected items 1001 List Box */
  9. CALL VpGetIndex window,1001,'ALLSELECTED','INDEXES.'
  10.  
  11. do x=1 to indexes.0
  12.     /* Get item value at index 1001 List Box */
  13.     filename=VpGetItemValue(window,1001,indexes.x)
  14.     attributea=SUBSTR(filename,posofa,1)
  15.     if attributea='A' then
  16.       numofa=numofa+1
  17.     attributes=SUBSTR(filename,posofs,1)
  18.     if attributes='S' then
  19.       numofs=numofs+1
  20.     attributeh=SUBSTR(filename,posofh,1)
  21.     if attributeh='H' then
  22.       numofh=numofh+1
  23.     attributer=SUBSTR(filename,posofr,1)
  24.     if attributer='R' then
  25.       numofr=numofr+1
  26. end
  27.  
  28. /* set state of ARCHIVE check box */
  29. if indexes.0==0 then
  30.  do
  31.    /* Uncheck the item A1002 Check Box */
  32.    CALL VpSelect window,1002,0
  33.    /* Disable item A1002 Check Box */
  34.    CALL VpItem window,1002,'DISABLE' 
  35.  end
  36. else
  37.  do
  38.    /* Enable item A1002 Check Box */
  39.    CALL VpItem window,1002,'ENABLE'
  40.    if numofa==0 then
  41.      do
  42.        /* Uncheck the item  A1002 Check Box */
  43.        CALL VpSelect window,1002,0
  44.      end
  45.    else if numofa==indexes.0 then
  46.      do
  47.        /* Check the item  A1002 Check Box */
  48.        CALL VpSelect window,1002,1
  49.      end
  50.    else
  51.      do
  52.        /* Check the item as 3state A1002 Check Box */
  53.        CALL VpSelect window,1002,2
  54.      end 
  55.  end
  56.  
  57. /* set state of SYSTEM check box */
  58. if indexes.0==0 then
  59.  do
  60.    /* Uncheck the item S1003 Check Box */
  61.    CALL VpSelect window,1003,0
  62.    /* Disable item S1003 Check Box */
  63.    CALL VpItem window,1003,'DISABLE' 
  64.  end
  65. else
  66.  do
  67.    /* Enable item S1003 Check Box */
  68.    CALL VpItem window,1003,'ENABLE'
  69.    if numofs==0 then
  70.      do
  71.        /* Uncheck the item  S1003 Check Box */
  72.        CALL VpSelect window,1003,0
  73.      end
  74.    else if numofs==indexes.0 then
  75.      do
  76.        /* Check the item  S1003 Check Box */
  77.        CALL VpSelect window,1003,1
  78.      end
  79.    else
  80.      do
  81.        /* Check the item as 3state S1003 Check Box */
  82.        CALL VpSelect window,1003,2
  83.      end 
  84.  end
  85.  
  86. /* set state of HIDDEN check box */
  87. if indexes.0==0 then
  88.  do
  89.    /* Uncheck the item H1004 Check Box */
  90.    CALL VpSelect window,1004,0
  91.    /* Disable item H1004 Check Box */
  92.    CALL VpItem window,1004,'DISABLE' 
  93.  end
  94. else
  95.  do
  96.    /* Enable item H1004 Check Box */
  97.    CALL VpItem window,1004,'ENABLE'
  98.    if numofh==0 then
  99.      do
  100.        /* Uncheck the item  H1004 Check Box */
  101.        CALL VpSelect window,1004,0
  102.      end
  103.    else if numofh==indexes.0 then
  104.      do
  105.        /* Check the item  H1004 Check Box */
  106.        CALL VpSelect window,1004,1
  107.      end
  108.    else
  109.      do
  110.        /* Check the item as 3state H1004 Check Box */
  111.        CALL VpSelect window,1004,2
  112.      end 
  113.  end
  114.  
  115. /* set state of READONLY check box */
  116. if indexes.0==0 then
  117.  do
  118.    /* Uncheck the item R1005 Check Box */
  119.    CALL VpSelect window,1005,0
  120.    /* Disable item R1005 Check Box */
  121.    CALL VpItem window,1005,'DISABLE' 
  122.  end
  123. else
  124.  do
  125.    /* Enable item R1005 Check Box */
  126.    CALL VpItem window,1005,'ENABLE'
  127.    if numofr==0 then
  128.      do
  129.        /* Uncheck the item  R1005 Check Box */
  130.        CALL VpSelect window,1005,0
  131.      end
  132.    else if numofr==indexes.0 then
  133.      do
  134.        /* Check the item  R1005 Check Box */
  135.        CALL VpSelect window,1005,1
  136.      end
  137.    else
  138.      do
  139.        /* Check the item as 3state R1005 Check Box */
  140.        CALL VpSelect window,1005,2
  141.      end 
  142.  end
  143.  
  144.