FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Menu in a Dialog
Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Menu in a Dialog
Posted: Sat Feb 27, 2010 07:41 PM

How add a menu for a dialog ?

Someone can help me Thanks

Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Menu in a Dialog
Posted: Sat Feb 27, 2010 07:57 PM

Hello Lailton

from ON INIT

ON INIT( ::SetMenu( BuildMenu() ) )

Posts: 603
Joined: Sun May 04, 2008 08:44 PM
Re: Menu in a Dialog
Posted: Sat Feb 27, 2010 08:19 PM

Thanks

Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: Menu in a Dialog
Posted: Sat Sep 19, 2020 02:18 PM
please help with this, i can´t make that this code run:
Code (fw): Select all Collapse
 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/
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Menu in a Dialog
Posted: Sat Sep 19, 2020 02:32 PM
Try with

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


EMG
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: Menu in a Dialog
Posted: Sat Sep 19, 2020 02:48 PM

no work. i try it

FWH 21.02
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Menu in a Dialog
Posted: Sat Sep 19, 2020 03:30 PM
Code (fw): Select all Collapse
          ACCELERATOR ACC_ALT, VK_F5
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Menu in a Dialog
Posted: Sat Sep 19, 2020 03:35 PM

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

EMG

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Menu in a Dialog
Posted: Sat Sep 19, 2020 03:55 PM
Mira, funciona bien...

Code (fw): Select all Collapse
#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
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: Menu in a Dialog
Posted: Mon Sep 21, 2020 01: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/
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Menu in a Dialog
Posted: Mon Sep 21, 2020 02: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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Menu in a Dialog
Posted: Mon Sep 21, 2020 06: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
Posts: 1956
Joined: Fri Oct 07, 2005 07:08 PM
Re: Menu in a Dialog
Posted: Wed Sep 23, 2020 09: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/

Continue the discussion