On a dialog a I have a xbrowse with buttons at the bottom

ON a button I have a menu popup
I create this menu popup from a dbf
each items of menu have an action for the oBrw of the Invoice
I Put the menu popup into rbtn button at the bottom of the oBrw (xbrowse)
the problem is the baction is processed before to open the dialog and the obrw
but I wish not process the bation before but when the final user select the item from menu
How i can make it ?

ON a button I have a menu popup
I create this menu popup from a dbf
each items of menu have an action for the oBrw of the Invoice
I Put the menu popup into rbtn button at the bottom of the oBrw (xbrowse)
the problem is the baction is processed before to open the dialog and the obrw
but I wish not process the bation before but when the final user select the item from menu
How i can make it ?
Function MenuVociNote(oBrw,nInvoice)
Local avocinote :={}
SELECT NV
while ! NV->(Eof())
Aadd(avocinote, NV->NVDESCR)
NV->(DbSkip())
enddo
MENU oPopupNote POPUP 2010
For i := 1 to Len(avocinote)
bAction :=InserVoci(i, oBrw, nInvoice)
MENUITEM RTrim(avocinote[i]) BLOCK bAction
Next i
MENUITEM "Personalizza "
ENDMENU
return oPopupNote
Function InserVoci(n,oBrw,nInvoice)
SELECT NV
NV->(dbgoto(n))
IF msgYesNo("Devo inserire questa voce"+ NV->NVDESCR)
SELECT PA
PA->(DbAppend())
Replace PA->PAINVOICE With nInvoice
Replace PA->PADESC With NV->NVDESCR
PA->(DbCommit())
endif
* oBrw:refresh()
* oBrw:setfocus()
*/
Return NILSince from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com