Hola a todos,
He encontrado un problema con parámetros faltantes en la clase TTaskPanel.
La llamada original no pasa todos los parámetros al método:
METHOD AddLink( cPrompt, bAction, cBitmap, oFnt, nClrT, nClrP, nClrO ) CLASS TTaskPanel
local nTop := ::nTitleHeight + 10, n, oUrlLink
if ! Empty( ::aControls )
for n = 1 to Len( ::aControls )
nTop += ::aControls[ n ]:nHeight + ::nOffSetY
next
endif
oUrlLink := TUrlLink():New( nTop, 33, Self, .T., .F., if( HB_IsNIL( oFnt ), ::oFont, oFnt ), ;
"", cPrompt, , nClrT, nClrP, nClrO )
if !HB_IsNIL( nClrT )
oUrlLink:nClrText := nClrT
endif
oUrlLink:SetColor( oUrlLink:nClrText, if( HB_IsNIL( nClrP ), ::nClrPane, nClrP ) )
oUrlLink:nClrOver = if( HB_IsNIL( nClrO ), ::nClrHover, nClrO )
oUrlLink:bAction = bAction
if File( cBitmap )
oUrlLink:hBmp = ReadBitmap( 0, cBitmap )
else
oUrlLink:hBmp = LoadBitmap( GetResources(), cBitmap )
endif
if oUrlLink:nTop + oUrlLink:nHeight > ::nHeight
::nHeight := oUrlLink:nTop + oUrlLink:nHeight + 10
::nBodyHeight := ::nHeight - ::nTitleHeight
::UpdateRegion()
endif
return nilLa forma correcta serÃa:
METHOD AddLink( cPrompt, bAction, cBitmap, oFnt, nClrT, nClrP, nClrO, cMsg, cTooltip ) CLASS TTaskPanel
local nTop := ::nTitleHeight + 10, n, oUrlLink
if ! Empty( ::aControls )
for n = 1 to Len( ::aControls )
nTop += ::aControls[ n ]:nHeight + ::nOffSetY
next
endif
oUrlLink := TUrlLink():New( nTop, 33, Self, .T., .F., if( HB_IsNIL( oFnt ), ::oFont, oFnt ), ;
cMsg, cPrompt, cToolTip , nClrT, nClrP, nClrO )
if !HB_IsNIL( nClrT )
oUrlLink:nClrText := nClrT
endif
oUrlLink:SetColor( oUrlLink:nClrText, if( HB_IsNIL( nClrP ), ::nClrPane, nClrP ) )
oUrlLink:nClrOver = if( HB_IsNIL( nClrO ), ::nClrHover, nClrO )
oUrlLink:bAction = bAction
if File( cBitmap )
oUrlLink:hBmp = ReadBitmap( 0, cBitmap )
else
oUrlLink:hBmp = LoadBitmap( GetResources(), cBitmap )
endif
if oUrlLink:nTop + oUrlLink:nHeight > ::nHeight
::nHeight := oUrlLink:nTop + oUrlLink:nHeight + 10
::nBodyHeight := ::nHeight - ::nTitleHeight
::UpdateRegion()
endif
return nilSimplemente agregando los campos cMsg y cTooltip, ambos aparecerán automáticamente en la ventana.
Modifiqué la clase, pero serÃa mejor que se mantuviera en su idioma nativo para no tener que cambiarla constantemente.
Saludos cordiales.
Alexandre Pereira
Harbour 3.2 - FWH - 25.12 - MSVC - VsCODE - Win11
