Page 1 of 1
Menú emergente en xBrowse (SOLUCIONADO)
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Oct 18, 2023 3:05 pm
by Armando
Amigos del foro:
Necesito que sobre un xBrowse al dar clic, ya sea izquierdo o derecho, sobre una celda me muestre
un menú emergente, algún ejemplo?
Muchas gracias
Re: Menú emergente en xBrowse
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Oct 18, 2023 3:22 pm
by VitalJavier
Armando, que tal
Que tipo de Menu?
- Code: Select all Expand view
oBrow:bRClicked := { | nRow, nCol | ARTICULO1CLICKRIGHT(oDlg,oBrow,nRow,nCol) }
FUNCTION ARTICULO1CLICKRIGHT(oDlg,oBrow,nRow,nCol)
Local oMenu
DEFAULT nRow := 0, nCol := oBrow:nColAct
MENU oMenu POPUP 2007
MENUITEM "Movimientos...." ACTION ..... lo que ejecuta
MENUITEM "Imprimir...." ACTION
MENUITEM "Salir del Catalogo" ACTION
ENDMENU
ACTIVATE POPUP oMenu AT nRow - 5, nCol of oBrow
RETURN .T.
Re: Menú emergente en xBrowse
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Oct 18, 2023 3:28 pm
by Armando
Hola Javier:
Espero que te encuentres bien de salud y con mucho trabajo.
Creo que tu ejemplo es lo que necesito, lo voy a probar y aviso.
Un abrazo
Re: Menú emergente en xBrowse
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Oct 18, 2023 3:44 pm
by karinha
Re: Menú emergente en xBrowse
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Oct 18, 2023 8:30 pm
by Armando
Javier y Amigos:
Siguiendo el consejo de Javier, tengo el siguiente código
- Code: Select all Expand view
:bRClicked := { | nRow, nCol | MyPopMenu(oBrw,oBrw:nRowSel,oBrw:nColSel) }
STATIC FUNCTION MyPopMenu(oBrw,nRow,nCol)
LOCAL oMenu
MENU oMenu POPUP 2007
MENUITEM "Registrar" ACTION MsgInfo("Registrar")
SEPARATOR
MENUITEM "Eliminar" ACTION MsgInfo("Eliminar")
SEPARATOR
MENUITEM "Salir" ACTION oMenu:END( )
ENDMENU
ACTIVATE POPUP oMenu AT nRow , nCol OF oBrw
RETURN(.T.)
Y funciona, me muestra el menú pero siempre lo muestra en la esquina superior izquierda del BROWSE
me gustaría que aparezca abajo del renglón y columna en la que el usuario da el clic y que solo ciertas
columnas tengan la posibilidad de crear el menú, ahora en cualquier parte del Browse que se da el clic
el menú se activa.
Saludos
Re: Menú emergente en xBrowse
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Oct 18, 2023 8:39 pm
by karinha
Armando:
C:\FWH..\SAMPLES\MALLORCA.PRG
Regards, saludos.
Re: Menú emergente en xBrowse
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Wed Oct 18, 2023 8:45 pm
by Armando
Karinha:
Gracias, Parece que el ejemplo en Mallorca.Prg el menú se activa en cualquier parte del Browse.
Saludos