gracias a todos por la ayuda prestada

Antonio Linares wrote:Asi que este va a ser el código definitivo. Funciona bien samples/test2003.prg sin necesidad de la función WinRun() que incluye y funciona bien con FWH 64 tambien
Code: Select all | Expand
METHOD Activate() CLASS TPreview
ACTIVATE WINDOW ::oWnd MAXIMIZED ;
ON RESIZE ( ::PaintMeta() , ::ChangeListView() ) ; // añadido changelistview()
ON UP ::VScroll( GO_UP ) ;
.....
METHOD ChangeListView() CLASS TPreview
local oRect := ::oWnd:GetCliRect()
local nHeight := oRect:nHeight
local nWidth := oRect:nWidth
::oLvw:nHeight := nHeight - If( ::oWnd:oBar != nil, ::oWnd:oBar:nHeight() - 2,;
::oWnd:oTop:nHeight() ) - ;
If( ::oWnd:oMsgBar != nil, ::oWnd:oMsgBar:nHeight(),;
::oWnd:oBottom:nHeight() )
IF ::oLvw:nLeft == 0
if ::oMeta1:nLeft <= ::oLvw:nWidth
::olvw:hide()
else
::olvw:show()
endif
else
::oLvw:nLeft := nWidth - ::oLvw:nWidth
if ::lTwoPages
if ::oLvw:nLeft <= ::oMeta2:nRight
::oLvw:hide()
else
::oLvw:show()
endif
else
if ::oLvw:nLeft <= ::oMeta1:nRight
::oLvw:hide()
else
::oLvw:show()
endif
endif
endif
::oLvw:refresh()
Return nil
METHOD TwoPages( lMenu ) CLASS TPreview
.....
::oWnd:Refresh()
::PaintMeta()
::ChangelistView() // añadido para cambiarlo al activar boton two pages
SetResources( hOldRes )
return nil
Antonio Linares wrote:Manuel,
Yo lo veo más como que al seleccionar dos páginas tenemos que ocultar el listview, como hacemos en zoom. Pero no mezclaria una cosa con la otra, porque cuando se va a mostrar no hace falta redimensionarlo porque ya lo está.
Igual se me escapa algo, por que lo propones asi ?
Code: Select all | Expand
METHOD TwoPages( lMenu ) CLASS TPreview
.....
::oWnd:Refresh()
::PaintMeta()
oRect := ::oWnd:GetCliRect()
nWidth := oRect:nWidth
::oLvw:nLeft := nWidth - ::oLvw:nWidth
if ::oLvw:nLeft <= ::oMeta2:nRight
::oLvw:hide()
else
::oLvw:show()
endif
::oLvw:refresh()
SetResources( hOldRes )
return nil