Hello,
is it possible to define a SUBMENU from a metro menubutton `
I can display the submenu, but there is still something wrong.
I would like to start the SUBMENU from menu 2 < Index - button >
Ok I can move the Index-button to the MAIN-page and call menu 3,
but would like a SUBMENU-solution.
The STRUCTURE i'm using for the moment
DEFINE METROPANEL oMetro OF oWnd TITLE "Stammdaten" ;
COLOR nWText, CLR_BLUE
oMetro:oFont := oFontLarge
oMetro:lDesignMode := .T.
oMetro:nMetroTop = 160
oMetro:nMetroMargin := 50
oMetro:nBtnSize = 120
oMetro:nMetroRows := 8
...
...
DEFINE METROBUTTON oSBtn[31] OF oMetro ;
COLOR nMText3A, nMColor3 ;
CAPTION "&Service" ;
ALIGN "TOPLEFT" ;
GROUP 3 ;
BITMAP c_Pfad1 + "Service.bmp" ;
BMPALIGN "MIDDLECENTER" ;
SIZE 50, 50 ;
MENU SERVICE(oWnd,oMetro)
oSBtn[31]:nClrCaption := nMText3B
oSBtn[31]:oFont := oFontSmall
oSBtn[31]:oTextFont := oFontTiny
...
...
oMetro:Show()
RETURN NIl
// ----
STATIC FUNCTION SERVICE(oWnd,oMetro)
LOCAL oBtn[20], oBrush
IF oMenu2 == nil
DEFINE METROPANEL oMenu2 OF oWnd TITLE "Service" ;
COLOR nWText, CLR_GREEN ;
ON CLICK ( oMenu2:HIDE(), oMetro:Show() )
oMenu2:oFont := oFontLarge
oBrush := WD_BACKGRD( oMenu2, nWStyle, nWColorF, nWColorB, lWDirect, nWGradPos, cWBrush, cWImage )
oMenu2:SetBrush( oBrush )
oBrush:End()
...
...
DEFINE METROBUTTON oSBtn[72] OF oMenu2 ;
COLOR nMText6B, nMColor6 ;
CAPTION "Index" ;
ALIGN "TOPLEFT" ;
GROUP 1 ;
BITMAP c_Pfad1 + "Index.bmp" ;
BMPALIGN "MIDDLECENTER" ;
SIZE 50, 50 ;
BODYTEXT "Neuaufbau" ;
TEXTALIGN "BOTTOMCENTER" ;
ACTION NEUINDEX(oWnd,oMetro) // SUBMENU ????
oSBtn[72]:nClrCaption := nMText6A
oSBtn[72]:oFont := oFontSmall
oSBtn[72]:oTextFont := oFontTiny
...
...
ELSE
oMenu2:SHOW()
ENDIF
oMenu2:bRClicked := {|| oMenu2:HIDE(), oMetro:Show() }
RETURN oMenu2
// -----
STATIC FUNCTION NEUINDEX(oWnd,oMetro)
???
???
best regards
Uwe