home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
4611
/
fw16d.ins
/
SAMPLES
/
TESTPOP.PRG
< prev
next >
Wrap
Text File
|
1994-06-07
|
2KB
|
63 lines
#include "FiveWin.ch"
static oWnd, oMenu
//----------------------------------------------------------------------------//
function Main()
DEFINE WINDOW oWnd ;
FROM 1, 1 TO 20, 65 ;
TITLE "FiveWin - Testing Popup Menus"
SET MESSAGE OF oWnd TO "Press Mouse Left Button to activate the Popup"
ACTIVATE WINDOW oWnd ;
ON CLICK ShowPopUp( nRow, nCol )
return nil
//----------------------------------------------------------------------------//
function BuildPopup()
local oMenu
MENU oMenu POPUP // Creating a POPUP
MENUITEM "Open"
MENU
MENUITEM "New" MESSAGE "New whatever..."
SEPARATOR
MENUITEM "Get" ;
MESSAGE "Get whatever..." ;
ACTION cGetFile( "Clipper DataBase (*.dbf) | *.dbf |" + ;
"Paradox DataBase (*.db) | *.db",;
"Please Select" )
ENDMENU
MENUITEM "Close"
MENU
MENUITEM "New..."
SEPARATOR
MENUITEM "Old..."
ENDMENU
MENUITEM "Select" MESSAGE "Select whatever..."
MENUITEM "All" ACTION MsgInfo( "Todo" ) MESSAGE "Everything"
SEPARATOR
MENUITEM "More..." ACTION MsgInfo( "More" ) ;
MESSAGE "This is just an example"
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function ShowPopup( nRow, nCol )
DEFAULT oMenu := BuildPopup()
ACTIVATE POPUP oMenu WINDOW oWnd AT nRow, nCol
return nil
//----------------------------------------------------------------------------//