Do you want that the menu width changes meanwhile the menu is shown ?
local cName := cName1 := "Test" , cName2 := "Long Long Long Long Long Long Long Long Long Test"
MENU oMenu POPUP 2007
MENUITEM "Wettbewerb auswählen" ;
ACTION (cName := if(cName==cName1,cName2,cName1) , oMenu:aMenuItems[2]:setprompt(cName))
#include "Fivewin.ch"
Static cName1
FUNCTION MAIN()
LOCAL oWnd
cName1 := "Test"
DEFINE WINDOW oWnd
oWnd:bRClicked := { |nRow, nCol, nFlags| MiMenu( oWnd, nRow, nCol ) }
ACTIVATE WINDOW oWnd
RETURN NIL
//----------------------------------------------------------------------------//
Function MiMenu( oWnd, nRow, nCol )
Local oMenu
Local oItem1
Local oItem2
Local oItem3
local cName := "Test"
Local cName2 := "Long Long Long Long Long Long Long Long Long Test"
MENU oMenu POPUP //2007
MENUITEM oItem1 PROMPT "Wettbewerb auswählen" ;
ACTION ( cName1 := if( cName == cName1, cName2, cName ) ,;
oItem2:SetPrompt( cName1 ) ) //oMenu:aMenuItems[2]:setprompt(cName) )
MENUITEM oItem2 PROMPT cName1
SEPARATOR
MENUITEM oITem3 PROMPT "Y OTRO" ACTION MsgInfo( Len( oMenu:aMenuItems ) )
ENDMENU
ACTIVATE POPUP oMenu WINDOW oWnd AT 140, 10
Return oMenu
//----------------------------------------------------------------------------//
Where are you using such popup from ?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 46 guests