PROBLEMAS CON EL TWBROWSE
Posted: Fri Jun 21, 2013 5:45 pm
Hola uso el LISTBOX para los browse de mis sistemas, pero en algunas compus pasan cosas raras desde que compilo con xHarbour1.0
Desaparecen visualmente los _, luego a veces marca error en el TWBROWSE:PAINT
Alguien sabe porque ?
METHOD Paint() CLASS TWBrowse
local n := 1, nSkipped := 1, nLines
local nSkip, nRealSkip
local aInfo
_WBRWSET_
if ::lIconView
::DrawIcons()
return 0
endif
CursorWait()
aInfo:= ::DispBegin()
if ::nRowPos == 1 .and. ! Empty( ::cAlias ) .and. ;
Upper( ::cAlias ) != "ARRAY" .and. Upper( ::cAlias ) != "_TXT_"
if ! ( ::cAlias )->( EoF() )
( ::cAlias )->( DbSkip( -1 ) )
if ! ( ::cAlias )->( BoF() )
( ::cAlias )->( DbSkip() )
endif
endif
endif
::DrawHeaders() // CeSoTech
::DrawFooters() // CeSoTech
if ( ::nLen := Eval( ::bLogicLen ) ) > 0
////////////////////////////////////
// AutoEstabilizacion by CeSoTech //
////////////////////////////////////
// le quite estas lineas por el error de PAINT
nSkip := 1 - ::nRowPos
nRealSkip:= ::Skip( nSkip )
if nSkip <> nRealSkip
::nRowPos-= nRealSkip - nSkip // Esta es la linea que habia quitado por el problema
::nRowPos:= Max( ::nRowPos, 1 )
EndIf
#ifdef __XPP__
nLines = ::nRowCount()
while n <= nLines .and. nSkipped == 1
::DrawLine( n )
nSkipped = ::Skip( 1 )
if nSkipped == 1
n++
endif
end
::Skip( ::nRowPos - n )
#else
// WBrwPane() returns the nº of visible rows
// WBrwPane recieves at aColSizes the Array or a Block
// to get dinamically the Sizes !!!
::Skip( ::nRowPos - wBrwPane( ::hWnd, ::hDC, Self, ::bLine,;
::aColSizes, ::nColPos, ::nClrText, ::nClrPane,;
If( ::oFont != nil, ::oFont:hFont, 0 ), ::aJustify, ;
::nLineStyle, 0 , .f., ::bTextColor, ::bBkColor, ::nClrLine,;
::oBrush:nRGBColor, ::bFont ) )
#endif
if ::nLen < ::nRowPos
::nRowPos = ::nLen
endif
::DrawSelect()
endif
::DispEnd( aInfo )
If ::oVScroll != Nil .and. ::bLogicPos != Nil
if ::lHitTop .or. ( ::nLogicPos!= nil .and. ::nLogicPos <= 1 ) .or. ::lGoTop .or. ::nLen <= 1
::oVScroll:SetPos( 1 )
elseif ::lHitBottom .or. ::lGoBottom
::oVScroll:SetPos( 100 )
else
::oVScroll:SetPos( _POSVSCROLL_ )
endif
EndIf
if ! Empty( ::cAlias ) .and. Upper( ::cAlias ) != "ARRAY" ;
.and. Upper( ::cAlias ) != "_TXT_"
::lHitTop = ( ::cAlias )->( BoF() )
::lHitBottom = ( ::cAlias )->( EoF() )
endif
CursorArrow()
return 0
Desaparecen visualmente los _, luego a veces marca error en el TWBROWSE:PAINT
Alguien sabe porque ?
METHOD Paint() CLASS TWBrowse
local n := 1, nSkipped := 1, nLines
local nSkip, nRealSkip
local aInfo
_WBRWSET_
if ::lIconView
::DrawIcons()
return 0
endif
CursorWait()
aInfo:= ::DispBegin()
if ::nRowPos == 1 .and. ! Empty( ::cAlias ) .and. ;
Upper( ::cAlias ) != "ARRAY" .and. Upper( ::cAlias ) != "_TXT_"
if ! ( ::cAlias )->( EoF() )
( ::cAlias )->( DbSkip( -1 ) )
if ! ( ::cAlias )->( BoF() )
( ::cAlias )->( DbSkip() )
endif
endif
endif
::DrawHeaders() // CeSoTech
::DrawFooters() // CeSoTech
if ( ::nLen := Eval( ::bLogicLen ) ) > 0
////////////////////////////////////
// AutoEstabilizacion by CeSoTech //
////////////////////////////////////
// le quite estas lineas por el error de PAINT
nSkip := 1 - ::nRowPos
nRealSkip:= ::Skip( nSkip )
if nSkip <> nRealSkip
::nRowPos-= nRealSkip - nSkip // Esta es la linea que habia quitado por el problema
::nRowPos:= Max( ::nRowPos, 1 )
EndIf
#ifdef __XPP__
nLines = ::nRowCount()
while n <= nLines .and. nSkipped == 1
::DrawLine( n )
nSkipped = ::Skip( 1 )
if nSkipped == 1
n++
endif
end
::Skip( ::nRowPos - n )
#else
// WBrwPane() returns the nº of visible rows
// WBrwPane recieves at aColSizes the Array or a Block
// to get dinamically the Sizes !!!
::Skip( ::nRowPos - wBrwPane( ::hWnd, ::hDC, Self, ::bLine,;
::aColSizes, ::nColPos, ::nClrText, ::nClrPane,;
If( ::oFont != nil, ::oFont:hFont, 0 ), ::aJustify, ;
::nLineStyle, 0 , .f., ::bTextColor, ::bBkColor, ::nClrLine,;
::oBrush:nRGBColor, ::bFont ) )
#endif
if ::nLen < ::nRowPos
::nRowPos = ::nLen
endif
::DrawSelect()
endif
::DispEnd( aInfo )
If ::oVScroll != Nil .and. ::bLogicPos != Nil
if ::lHitTop .or. ( ::nLogicPos!= nil .and. ::nLogicPos <= 1 ) .or. ::lGoTop .or. ::nLen <= 1
::oVScroll:SetPos( 1 )
elseif ::lHitBottom .or. ::lGoBottom
::oVScroll:SetPos( 100 )
else
::oVScroll:SetPos( _POSVSCROLL_ )
endif
EndIf
if ! Empty( ::cAlias ) .and. Upper( ::cAlias ) != "ARRAY" ;
.and. Upper( ::cAlias ) != "_TXT_"
::lHitTop = ( ::cAlias )->( BoF() )
::lHitBottom = ( ::cAlias )->( EoF() )
endif
CursorArrow()
return 0