home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD-ROM Aktiv 1
/
CDA1_96.ISO
/
clipper
/
menufram.txt
< prev
next >
Wrap
Text File
|
1995-10-06
|
2KB
|
49 lines
// The following code changes will implement a black frame around
// pop-up menus when in graphics mode using Clipper 5.3.
//
// The instructions below show the line numbers from the original
// MENUSYS.PRG supplied by CA-Clipper.
//
// You may notice some "flicker" on your menu as you move through
// it, but it is small price to pay in order to get that border
// around the menu.
//
// You may wonder why I turn off the mouse cursor while drawing
// the frame... If you don't if your mouse is anywhere near the
// drawing area, it will probably clip the horizontal lines at the
// top and bottom of the menu.
//
// If anyone has any comments about this or maybe an
// improvement over this method, I would be tickled pink to hear
// about it.
//
// By the way, the // characters are not to be included in your final
// code modifications where noted.
//
// Good Luck
// Bryan D.
// --------------------------------------------------------------------
// In Program Menusys.prg, insert the following:
// At lines 134, 149, 262
// oMenu:Display() // Don't include the //
// ShowFrame(oMenu) // ditto
// At line 341
// oMenu:Open() // ditto
// ShowFrame(oMenu) // ditto
//
// At end of prg file ( or anywhere else you like), insert
// this code.....
static function ShowFrame(oPopUp)
LOCAL lMouse := MSetCursor(.F.)
// Draw black frame around the menu if in graphic mode
IF !(_ISGRAPHIC())
ELSE
gRect(Col2Pxl(oPopUp:left), Row2Pxl(oPopUp:top)+2, ;
Col2Pxl(oPopUp:right), Row2Pxl(oPopUp:bottom), ;
LLG_FRAME, LLG_CLR_BLACK, LLG_MODE_SET)
ENDIF
MSetCursor(lMouse)
return nil