How to add element to right click popup menu list in TGet.

How to add element to right click popup menu list in TGet.

Postby Horizon » Wed Nov 06, 2024 12:03 pm

Hi,

How to add element to right click popup menu list in TGet.

Thanks,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: How to add element to right click popup menu list in TGet.

Postby karinha » Wed Nov 06, 2024 2:04 pm

I do it like this. If this is not what you want, explain your intentions further, pls.

Yo lo hago así. Si esto no es lo que desea, explique más sus intenciones, por favor.

Code: Select all  Expand view  RUN

   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
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7872
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: How to add element to right click popup menu list in TGet.

Postby karinha » Wed Nov 06, 2024 2:37 pm

Look,

Code: Select all  Expand view  RUN

// 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
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7872
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 74 guests