Hi,
How to add element to right click popup menu list in TGet.
Thanks,
REDEFINE GET aGet[10] VAR cTPSerCod PICTURE "@K !!!!" ID 21 OF oDlg ;
UPDATE COLORS CLR_BLACK, CLR_WHITE FONT oFont BITMAP "BUSCAR" ;
VALID( VERIFICA_COD_SERVICO( aGet, cTPSerCod ) ) ;
ACTION( MOSTRAR_COD_SERVICO( aGet, cTPSerCod ) )
aGet[10]:oCursor := oHand // Mostra um cursor no get
aGet[10]:cToolTip := OemToAnsi( "<F7> - Mostra o Tipo do Servi‡o" )
aGet[10]:lBtnTransparent := .T. // transparent button
// Aqui:-> Here.
aGet[10]:bKeyDown := { |nKey| IF( nKey == VK_F7, Eval( aGet[10]:bAction ), Nil ) }
FUNCTION MOSTRAR_COD_SERVICO()
...
RETURN...
// FIN / END
// C:\FWH\SAMPLES\MENUAFER.PRG
#include "Fivewin.ch"
FUNCTION TesteTravaBotao()
LOCAL oBtn1, oBtn2
PRIVATE oDlg
PRIVATE oGet1, cVar1 := PadR( "Test ", 20 )
PRIVATE oGet2, cVar2 := PadR( "Test2", 20 )
DEFINE DIALOG oDlg
oDlg:lHelpIcon := .F.
@ 1, 1 GET oGet1 VAR cVar1 oF oDlg
@ 2, 1 GET oGet2 VAR cVar2 oF oDlg ACTION( MenuTeste() )
@ 3, 01 BUTTON oBtn1 PROMPT "&Entrance" ACTION oDlg:End()
@ 3, 10 BUTTON oBtn2 PROMPT "&Exit" ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RETURN NIL
FUNCTION MenuTeste()
LOCAL oMenu
MENU oMenu 2007
MENUITEM "Menu 1"
MENU
MENUITEM "Option 1"
SEPARATOR
MENUITEM "Option 2"
SEPARATOR
MENUITEM "&Exit" ACTION( oDlg:End() )
ENDMENU
MENUITEM "Menu 2"
MENU
MENUITEM "Option 1"
MENUITEM "Option 2"
SEPARATOR
MENUITEM "Option 3"
ENDMENU
ENDMENU
oDlg:SetMenu( oMenu )
RETURN( .T. )
// FIN / END - kapiabafwh@gmail.com
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 31 guests