home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Aktiv 1 / CDA1_96.ISO / clipper / menufram.txt < prev    next >
Text File  |  1995-10-06  |  2KB  |  49 lines

  1. //  The following code changes will implement a black frame around
  2. //  pop-up menus when in graphics mode using Clipper 5.3.
  3. //
  4. //  The instructions below show the line numbers from the original
  5. //  MENUSYS.PRG supplied by CA-Clipper.
  6. //
  7. //  You may notice some "flicker" on your menu as you move through
  8. //  it, but it is small price to pay in order to get that border
  9. //  around the menu.
  10. //
  11. //  You may wonder why I turn off the mouse cursor while drawing
  12. //  the frame... If you don't if your mouse is anywhere near the
  13. //  drawing area, it will probably clip the horizontal lines at the
  14. //  top and bottom of the menu.
  15. //
  16. //  If anyone has any comments about this or maybe an
  17. //  improvement over this method, I would be tickled pink to hear
  18. //  about it.
  19. //
  20. //  By the way, the // characters are not to be included in your final
  21. //  code modifications where noted.
  22. //
  23. //  Good Luck
  24. //  Bryan D.
  25. //  --------------------------------------------------------------------
  26. //  In Program Menusys.prg, insert the following:
  27. //  At lines 134, 149, 262
  28. //          oMenu:Display()        // Don't include the //
  29. //          ShowFrame(oMenu)       // ditto
  30. //  At line 341
  31. //       oMenu:Open()              // ditto
  32. //       ShowFrame(oMenu)          // ditto
  33. //
  34. //  At end of prg file ( or anywhere else you like), insert
  35. //  this code.....
  36.  
  37.  
  38. static function ShowFrame(oPopUp)
  39.    LOCAL lMouse := MSetCursor(.F.)
  40.      // Draw black frame around the menu if in graphic mode
  41.      IF !(_ISGRAPHIC())
  42.      ELSE
  43.        gRect(Col2Pxl(oPopUp:left), Row2Pxl(oPopUp:top)+2, ;
  44.              Col2Pxl(oPopUp:right), Row2Pxl(oPopUp:bottom), ;
  45.              LLG_FRAME, LLG_CLR_BLACK, LLG_MODE_SET)
  46.      ENDIF
  47.      MSetCursor(lMouse)
  48.    return nil
  49.