friends
I wish set the hours from
00:00 to 23:00
how I must set and where please
METHOD MouseMoveView( nRow, nCol, nKeyFlags ) CLASS TCalEx
local aRet, oTooltip, cTooltip
local nTxtWidth := 0, nTxtHeight
local oFont, aPos, hOldFont
::CheckOverPrev( nRow, nCol )
aRet = ::HitTest( nRow, nCol )
if aRet[ HITTEST_PLACE ] == HITTEST_BODY
if ::lCaptured
::nIdReserva := 0 // fjhg 02-04-2013
else
*--------- fjhg 02-04-2013 Simula tooltip, muestra la info de la cita en vista DIARIA
if ::Classname() == "TDAYVIEW" .AND. ::oCalex:oCalInfo != NIL
if ( ::oCalex:oCalInfo:aCoords[ CI_RIGHT ] - ::oCalex:oCalInfo:aCoords[ CI_LEFT ] ) < VIEW_MIN .AND. ::nIdReserva <> ::oCalex:oCalInfo:nIdx
::nIdReserva := if( ::oCalex:oCalInfo == nil, 0, ::oCalex:oCalInfo:nIdx )
::aPos[1] := nRow
::aPos[2] := nCol
cTooltip := ::oCalex:oCalInfo:cSubject
DEFINE WINDOW oToolTip FROM 0, 0 TO 1, 5 ;
STYLE nOr( WS_POPUP, WS_BORDER ) ;
COLOR 0, RGB( 255, 255, 225 ) OF Self
DEFINE FONT oFont NAME GetSysFont() SIZE 0, -8
hWnd = CreateToolTip( Self:hWnd, If( ValType( cToolTip ) == "A", cToolTip[ 1 ], cToolTip ), ;
If( ::lBalloon != nil, ::lBalloon, .t. ) )
aPos := { nRow, nCol }
nTxtHeight := Max(14, GetTextHeight( oToolTip:hWnd )-2)
aToolTip := Array( nLenToolTip := MLCount( cToolTip, 254 ) )
AEval( aToolTip, {|c, n| aToolTip[ n ] := Trim( MemoLine( cToolTip, 252, n ) ), ;
nTxtWidth := Max( nTxtWidth, GetTextWidth( 0, aToolTip[ n ], oFont:hFont ) + 7 ) } )
oToolTip:Move( aPos[ 1 ], aPos[ 2 ], nTxtWidth, nTxtHeight * nLenToolTip + 3 )
// oTooltip:Show()
endif
else
::nIdReserva := 0
endif
endif
endif
return Super:MouseMove( nRow, nCol, nKeyFlags )
METHOD MouseMoveView( nRow, nCol, nKeyFlags ) CLASS TCalEx
local aRet
local cToolTip
::CheckOverPrev( nRow, nCol )
aRet = ::HitTest( nRow, nCol )
if aRet[ HITTEST_PLACE ] == HITTEST_BODY
if ::lCaptured
::Refresh()
endif
endif
if !empty( ::oCalex:oCalInfo )
cTooltip := ::oCalex:oCalInfo:cSubject
endif
if !empty( cToolTip )
//? "1"
//HTMLPOP( hWnd, cHelpFile, HH_DISPLAY_TEXT_POPUP, cnHelp, nRow, nCol, nBgColor,nTxColor )
HTMLPOP( GetActiveWindow(), nil, 0x000E, cToolTip )
endif
Francisco Horta wrote:Cristobal,
Que tal te adjunto lo que hice pero se me hace bolas el engrudo...
- Code: Select all Expand view RUN
METHOD MouseMoveView( nRow, nCol, nKeyFlags ) CLASS TCalEx
local aRet, oTooltip, cTooltip
local nTxtWidth := 0, nTxtHeight
local oFont, aPos, hOldFont
::CheckOverPrev( nRow, nCol )
aRet = ::HitTest( nRow, nCol )
if aRet[ HITTEST_PLACE ] == HITTEST_BODY
if ::lCaptured
::nIdReserva := 0 // fjhg 02-04-2013
else
*--------- fjhg 02-04-2013 Simula tooltip, muestra la info de la cita en vista DIARIA
if ::Classname() == "TDAYVIEW" .AND. ::oCalex:oCalInfo != NIL
if ( ::oCalex:oCalInfo:aCoords[ CI_RIGHT ] - ::oCalex:oCalInfo:aCoords[ CI_LEFT ] ) < VIEW_MIN .AND. ::nIdReserva <> ::oCalex:oCalInfo:nIdx
::nIdReserva := if( ::oCalex:oCalInfo == nil, 0, ::oCalex:oCalInfo:nIdx )
::aPos[1] := nRow
::aPos[2] := nCol
cTooltip := ::oCalex:oCalInfo:cSubject
DEFINE WINDOW oToolTip FROM 0, 0 TO 1, 5 ;
STYLE nOr( WS_POPUP, WS_BORDER ) ;
COLOR 0, RGB( 255, 255, 225 ) OF Self
DEFINE FONT oFont NAME GetSysFont() SIZE 0, -8
hWnd = CreateToolTip( Self:hWnd, If( ValType( cToolTip ) == "A", cToolTip[ 1 ], cToolTip ), ;
If( ::lBalloon != nil, ::lBalloon, .t. ) )
aPos := { nRow, nCol }
nTxtHeight := Max(14, GetTextHeight( oToolTip:hWnd )-2)
aToolTip := Array( nLenToolTip := MLCount( cToolTip, 254 ) )
AEval( aToolTip, {|c, n| aToolTip[ n ] := Trim( MemoLine( cToolTip, 252, n ) ), ;
nTxtWidth := Max( nTxtWidth, GetTextWidth( 0, aToolTip[ n ], oFont:hFont ) + 7 ) } )
oToolTip:Move( aPos[ 1 ], aPos[ 2 ], nTxtWidth, nTxtHeight * nLenToolTip + 3 )
// oTooltip:Show()
endif
else
::nIdReserva := 0
endif
endif
endif
return Super:MouseMove( nRow, nCol, nKeyFlags )
pero se alenta el sistema un poco... sera porque no estoy finalizando oFont?
pudieras echarle el ojo
saludos
paco
METHOD MouseMoveView( nRow, nCol, nKeyFlags ) CLASS TCalEx
local aRet, oTooltip, cTooltip
local nTxtWidth := 0, nTxtHeight
local oFont, aPos, hOldFont
::CheckOverPrev( nRow, nCol )
aRet = ::HitTest( nRow, nCol )
if aRet[ HITTEST_PLACE ] == HITTEST_BODY
if ::lCaptured
::nIdReserva := 0 // fjhg 02-04-2013
else
*--------- fjhg 02-04-2013 Simula tooltip, muestra la info de la cita en vista DIARIA
if ::Classname() == "TDAYVIEW" .AND. ::oCalex:oCalInfo != NIL
if ( ::oCalex:oCalInfo:aCoords[ CI_RIGHT ] - ::oCalex:oCalInfo:aCoords[ CI_LEFT ] ) < VIEW_MIN .AND. ::nIdReserva <> ::oCalex:oCalInfo:nIdx
::nIdReserva := if( ::oCalex:oCalInfo == nil, 0, ::oCalex:oCalInfo:nIdx )
//::aPos[1] := nRow
//::aPos[2] := nCol
cTooltip := ::oCalex:oCalInfo:cSubject
if cTooltip + Dtoc( ::dDateSelected ) <> ::oToolTip
::oToolTip := cToolTip + Dtoc( ::dDateSelected )
hWnd = CreateToolTip( Self:hWnd, If( ValType( cToolTip ) == "A", cToolTip[ 1 ], cToolTip ), ;
If( ::lBalloon != nil, ::lBalloon, .t. ) )
aPos := { nRow, nCol }
nTxtHeight := Max(14, GetTextHeight( hWnd ) - 2 )
aToolTip := Array( nLenToolTip := MLCount( cToolTip, 254 ) )
AEval( aToolTip, {|c, n| aToolTip[ n ] := Trim( MemoLine( cToolTip, 252, n ) ), ;
nTxtWidth := Max( nTxtWidth, GetTextWidth( 0, aToolTip[ n ], ::oFont:hFont ) + 7 ) } )
endif
else
::nIdReserva := 0
::oToolTip := Nil
endif
endif
endif
return Super:MouseMove( nRow, nCol, nKeyFlags )
if aRet[ HITTEST_PLACE ] == HITTEST_BODY
if ::lCaptured
::nIdReserva := 0 // fjhg 02-04-2013
else
if ( ::oCalex:oCalInfo:aCoords[ CI_RIGHT ] - ::oCalex:oCalInfo:aCoords[ CI_LEFT ] ) < VIEW_MIN .AND. ::nIdReserva <> ::oCalex:oCalInfo:nIdx
METHOD MouseMoveView( nRow, nCol, nKeyFlags ) CLASS TCalEx
local aRet
local cToolTip
local nTxtWidth := 0
local nTxtHeight
local nLenToolTip, hWnd, aToolTip, aPos
::CheckOverPrev( nRow, nCol )
aRet = ::HitTest( nRow, nCol )
if aRet[ HITTEST_PLACE ] == HITTEST_BODY
if ::lCaptured
::Refresh()
endif
endif
if Valtype( ::oToolTip ) = "U"
::oToolTip := 99999
endif
if !empty( ::oCalex:oCalInfo )
cTooltip := ::oCalex:oCalInfo:cSubject
endif
if !empty( cToolTip )
if ::oToolTip <> ::nAtRow .and. ::oToolTip >= 0
//HTMLPOP( hWnd, cHelpFile, HH_DISPLAY_TEXT_POPUP, cnHelp, nRow, nCol, nBgColor,nTxColor )
/*
HTMLPOP( GetActiveWindow(), nil, 0x000E, ;
Dtoc(::dDateSelected ) + CRLF + STr( ::oCalex:oCalInfo:nStart ) + CRLF +;
cToolTip + CRLF + Str( ::nRowDown ) + CRLF + Str( ::nAtRow ) + CRLF ,;
nRow , nCol , nRGB( 0, 25, 64 ), nRGB( 255, 255, 255 ) )
*/
hWnd = CreateToolTip( Self:hWnd, If( ValType( cToolTip ) == "A", cToolTip[ 1 ], cToolTip ), ;
If( ::lBalloon != nil, ::lBalloon, .t. ) )
//aPos := { nRow, nCol }
//::oToolTip:hWnd
nTxtHeight := Max( 14, GetTextHeight( hWnd ) - 2 )
aToolTip := Array( nLenToolTip := MLCount( cToolTip, 254 ) )
AEval( aToolTip, {|c, n| aToolTip[ n ] := Trim( MemoLine( cToolTip, 252, n ) ), ;
nTxtWidth := Max( nTxtWidth, GetTextWidth( 0, aToolTip[ n ], ::oFont:hFont ) + 7 ) } )
::oToolTip := -1
else
::oToolTip := ::nAtRow
endif
else
::oToolTip := 0
endif
return Super:MouseMove( nRow, nCol, nKeyFlags )
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 36 guests