home *** CD-ROM | disk | FTP | other *** search
/ DTP Toolbox / DTPToolbox.iso / utilities / propage_pdraw / donsgenies / propagegenies.lha / BoxesColors.pprx < prev    next >
Encoding:
Text File  |  1992-12-26  |  1.5 KB  |  65 lines

  1. /*
  2. @BBoxColors  @P@ICopyright Gold Disk Inc. January, 1992  - modified by Don Cox, Aug. 92, Dec 92
  3.  
  4. Set the text and fill colors of a number of boxes.
  5. */
  6. trace n
  7. address command
  8. call SafeEndEdit.rexx()
  9. call ppm_AutoUpdate(0)
  10. oldcolor = ppm_GetTextColor()
  11.  
  12. counter = 0
  13. do forever
  14.     box=ppm_ClickOnBox("  Click on boxes to be changed")
  15.     if box=0 then break
  16.     counter=counter+1
  17.     boxes.counter=box
  18.     call ppm_SelectBox(box)
  19.     end
  20.  
  21. if counter = 0 then exit_msg("No box selected")
  22.  
  23. colorlist   = ppm_GetColorList()
  24. colorlist   = substr(colorlist, pos('0a'x, colorlist) + 1)
  25.  
  26. color   =  ppm_SelectFromList("Select Fill Color..", 25, 18, 0, colorlist)
  27. if color = '' then exit_msg("Aborted")
  28. tcolor  =  ppm_SelectFromList("Select Text Color..", 25, 18, 0, colorlist)
  29. if tcolor = '' then exit_msg("Aborted ")
  30.  
  31. do i = 1 to counter
  32.     box = boxes.i
  33.     call ppm_SetBoxFrameData(box,color, color, ppm_GetLineWeight(),     ppm_GetLinePattern(), 1)
  34.     call ppm_SetBoxFrame(box, 1)
  35.     call ppm_SetBoxTransparent(box, 0)
  36.  
  37.     if upper(word(ppm_GetBoxInfo(box), 1)) ~= TEXT then iterate i
  38.  
  39.     call SafeSetEdit.rexx(box)
  40.     call ppm_SelectBoxText()
  41.     call ppm_SetTextColor(tcolor)
  42.     call SafeEndEdit.rexx()
  43.     end
  44.  
  45. call ppm_SetTextColor(oldcolor)
  46. call ppm_SetWireFrame(0)
  47. call exit_msg
  48. end
  49.  
  50. error:
  51. syntax:
  52.     do
  53.     exit_msg("Genie failed due to error: "errortext(rc))
  54.     end
  55.  
  56. exit_msg:
  57.     do
  58.     parse arg message
  59.     if message ~= "" then
  60.     call ppm_Inform(1,message,"Resume")
  61.     call ppm_ClearStatus()
  62.     call ppm_AutoUpdate(1)
  63.     exit
  64.     end