Menu in a Dialog

Menu in a Dialog

Postby lailton.webmaster » Sat Feb 27, 2010 7:41 pm

How add a menu for a dialog ?

Someone can help me Thanks
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Re: Menu in a Dialog

Postby Daniel Garcia-Gil » Sat Feb 27, 2010 7:57 pm

Hello Lailton

from ON INIT

ON INIT( ::SetMenu( BuildMenu() ) )
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Menu in a Dialog

Postby lailton.webmaster » Sat Feb 27, 2010 8:19 pm

Thanks
lailton.webmaster
 
Posts: 603
Joined: Sun May 04, 2008 8:44 pm

Re: Menu in a Dialog

Postby goosfancito » Sat Sep 19, 2020 2:18 pm

please help with this, i can´t make that this code run:
Code: Select all  Expand view

 MenuItem "&Nacimiento" action ::nacimiento( 0 ) ACCELERATOR 0, VK_F5


not work accelerator.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: Menu in a Dialog

Postby Enrico Maria Giordano » Sat Sep 19, 2020 2:32 pm

Try with

Code: Select all  Expand view
MenuItem "&Nacimiento" action ::nacimiento( 0 ) ACCELERATOR ACC_NORMAL, VK_F5


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Menu in a Dialog

Postby goosfancito » Sat Sep 19, 2020 2:48 pm

no work. i try it
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: Menu in a Dialog

Postby karinha » Sat Sep 19, 2020 3:30 pm

Code: Select all  Expand view

          ACCELERATOR ACC_ALT, VK_F5
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Menu in a Dialog

Postby Enrico Maria Giordano » Sat Sep 19, 2020 3:35 pm

Can I see a little sample showing the problem? Works fine here.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Menu in a Dialog

Postby karinha » Sat Sep 19, 2020 3:55 pm

Mira, funciona bien...

Code: Select all  Expand view

#Include "FiveWin.Ch"

STATIC oWnd

FUNCTION Main()

   LOCAL cTitle := "Teste de <F5>"

   DEFINE WINDOW oWnd TITLE cTitle                                           ;
          MENU BuildMenu( ) MENUINFO 3 MDI

   ACTIVATE WINDOW oWnd

RETURN NIL

FUNCTION BuildMenu()

   LOCAL oMenu, oMenu1, oMenu2, oMenu3

   MENU oMenu

      MENUITEM oMenu1 PROMPT "&Guardar - <F2> "     ;
          ACTION Grabar()                           ;
          ACCELERATOR 0, VK_F2                      ;
          MESSAGE "Guarda los dados"

      MENUITEM Omenu2 PROMPT "&Clientes - <F5> "

      MENU
         MENUITEM oMenu2 PROMPT "&Clientes - <F5> " ;
             ACTION Clientes()                      ;
             ACCELERATOR 0, VK_F5                   ; // funciona bien.
             MESSAGE "Grabar Clientes"

      ENDMENU

      MENUITEM oMenu3 PROMPT "&Salida <Alt+S> "     ;
          ACTION( oWnd:End() )                      ;
          MESSAGE "Salida"

   ENDMENU

RETURN( oMenu)

FUNCTION Grabar()

   ? [GRABAR]

RETURN NIL

FUNCTION Clientes()

   ? [CLIENTES]

RETURN NIL
 


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

Re: Menu in a Dialog

Postby goosfancito » Mon Sep 21, 2020 1:00 am

Hola. En windows si funciona, el problema es con dialogos.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm

Re: Menu in a Dialog

Postby karinha » Mon Sep 21, 2020 2:30 am

Mira se ayuda, ó ponga un ejemplo, porfa.

http://forums.fivetechsupport.com/viewtopic.php?f=6&t=34187&start=0

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

Re: Menu in a Dialog

Postby cnavarro » Mon Sep 21, 2020 6:35 pm

Si, he visto que en los diálogos no reconoce convenientemente las teclas aceleradoras, a mí también me ha pasado
Qué versión de fw estás utilizando?
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6548
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Menu in a Dialog

Postby goosfancito » Wed Sep 23, 2020 9:02 pm

7.2 muy vieja.

Antonio, te envíe un email. gracias.
FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
User avatar
goosfancito
 
Posts: 1954
Joined: Fri Oct 07, 2005 7:08 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests