ERROR. FWH 24_09 METROBUTTON-METROPANEL (solucion temporal)

ERROR. FWH 24_09 METROBUTTON-METROPANEL (solucion temporal)

Postby russimicro » Fri Nov 08, 2024 4:29 pm

Use las clases tpanel y tgroup de la version 24-02




Buen dia

Al pasar de fwh 24.02 a 24.09 con xhb.com

Si existe un METROBUTTON con la OPCION "MENU ...XXX()", no despliega el METROPANEL actual
Code: Select all  Expand view  RUN



   DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0, -46 BOLD
   DEFINE FONT oFon3 NAME "Segoe UI Light" SIZE 0, -20 BOLD
   DEFINE FONT oFon2 NAME 'Tahoma' SIZE 0, -13

   DEFINE METROPANEL oMe1Met OF oWnd TITLE  "Russoft ERP by RusSoft Ltda." ;
          COLOR CLR_BLACK,CLR_WHITE

   oMe1Met:oBtnFont:End()
   oMe1Met:lDesignMode := .T.
   oMe1Met:nMetroTop = 100
   oMe1Met:nMetroMargin = 140
   oMe1Met:nBtnSize = 130
   oMe1Met:nSliderTop = 100
   oMe1Met:oFont     := oFont
   oWnd:bMouseWheel = { | nKey, nDelta, nXPos, nYPos | oMe1Met:MouseWheel( nKey, nDelta, nXPos, nYPos )  }

   DEFINE METROBUTTON oBtn OF oMe1Met  ;
          BODYTEXT  "Pedidos; Ordenes de; Compra; Cotizaciones" ;
          TEXTALIGN  "TOPRIGHT" ;
          BITMAP    "imagenes\32x32\pedidoS.bmp" ;
          BMPALIGN  "BOTTOMLEFT" ;
          COLOR      CLR_WHITE,  RGB(247,144,39);
          MENU touchmenu7(oMe1Met,oWnd)

//*************************************

static function touchmenu7(ometro,oWnd)

LOCAL OBTN , oFont, oFon2


IF oMe7Met == nil

   DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0, -36 BOLD
   DEFINE FONT oFon2 NAME 'Tahoma' SIZE 0, -13

   IF SW_FONDO
      DEFINE METROPANEL oMe7Met OF oWnd TITLE  "Russoft ERP [ Pedidos, Ordenes de Compra ... ]";
          COLOR CLR_WHITE,CLR_BLACK
   ELSE
      DEFINE METROPANEL oMe7Met OF oWnd TITLE  "Russoft ERP [ Pedidos, Ordenes de Compra  ... ]" ;
          COLOR CLR_BLACK,CLR_WHITE
   ENDIF

   oMe7Met:lDesignMode := .T.
   oMe7Met:nMetroTop = 140
   oMe7Met:nMetroMargin = 140
   oMe7Met:nBtnSize = 130
   oMe7Met:nSliderTop = 140
   oMe7Met:oFont  :=  oFont

   verImagenFondo(oMe7Met)

   DEFINE METROBUTTON oBtn OF oMe7Met  ;
      CAPTION  "" ;
      ALIGN    "TOPLEFT" ;
      BODYTEXT  "Registro de;Transacciones;[Auxiliares]" ;
      TEXTALIGN "BOTTOMRIGHT" ;
      FONT  oFon2 ;
      ACTION ( IF(M->lManPed,A_ProdCapt_Captura( 0,0,0,cNomEmp,cNomSis,cAnoSys,dFecUsr,cPatSis,cPatInt,lSisInt,cNomUsr,cCodCaj,"A"),.T.) ,CIERRATODO()  )


   DEFINE METROBUTTON oBtn OF oMe7Met  ;
      CAPTION  "" ;
      ALIGN    "TOPLEFT" ;
      BODYTEXT  "Mantenimiento de;Transacciones" ;
      TEXTALIGN "BOTTOMRIGHT" ;
      FONT  oFon2 ;
      ACTION ( IF(M->lManPed,A_ProdMant_Mantenimiento(0,0,0,cNomEmp,cNomSis,cAnoSys,dFecUsr,cPatSis,cPatInt,lSisInt,cNomUsr,cCodCaj,"A",NIL,"no cierra tablas"),.T.), CIERRATODO()  )


   DEFINE METROBUTTON oBtn OF oMe7Met  ;
      CAPTION  "Regresar" ;
      ALIGN    "TOPLEFT" ;
      COLOR CLR_BLACK, RGB(244,244,0)  ;
      FONT    oFon2 ;
      BITMAP  "imagenes\32x32\REGRESA.bmp" ;
      ACTION  (oMe7Met:HIDE(),;
               oMETRO:Show() )

 ELSE
   oMe7Met:SHOW()
ENDIF

M->oMetWin := oMe7Met


RETURN oMe7Met



 


Al compilar el ejemplo TOUCH.PRG, despliega BuildMetroPanel()

JONSSON RUSSI
russimicro
 
Posts: 262
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia

Re: ERROR. FWH 24_09 METROBUTTON-METROPANEL (solucion temporal)

Postby russimicro » Sat Nov 09, 2024 1:07 am

Este código afecta a Tgroup
bloquear asi
/*
if !lPixel
if nTop >= 1.0; nTop *= GRP_CHARPIX_H; endif
if nLeft >= 1.0; nLeft *= GRP_CHARPIX_W; endif
if nBottom >= 1.0; nBottom *= GRP_CHARPIX_H; endif
if nRight >= 1.0; nRight *= GRP_CHARPIX_W; endif
endif
::CalcSize( @nTop, @nLeft, @nWidth, @nHeight, lRelPix, oWnd, @nBottom, @nRight )
*/

::nTop = nTop * If( lPixel, 1, GRP_CHARPIX_H ) // 14
::nLeft = nLeft * If( lPixel, 1, GRP_CHARPIX_W ) // 7

if nWidth != nil
::nRight = ::nLeft + nWidth
else
::nRight = nRight * If( lPixel, 1, GRP_CHARPIX_W ) // 7
endif

y este a Tpanel

dejar asi
METHOD New( nTop, nLeft, nBottom, nRight, oWnd, lDesign, cVarName, lBorder ) CLASS TPanel

DEFAULT nTop := 0, nLeft := 0, nBottom := 100, nRight := 100,;
oWnd := GetWndDefault(), lDesign := .F., lBorder := .F.

::lUnicode = FW_SetUnicode()

::nTop = nTop
::nLeft = nLeft
::nBottom = nBottom
::nRight = nRight
russimicro
 
Posts: 262
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests