Clipper On Line • Ver Tópico - GTWVW pequeno FIX ?

GTWVW pequeno FIX ?

Projeto Harbour - Compilador de código aberto compatível com o Clipper.

Moderador: Moderadores

 

GTWVW pequeno FIX ?

Mensagempor Itamar M. Lins Jr. » 16 Nov 2013 18:21

O pai da GTWVW apareceu lá no users-harbour puxei assunto sobre a WVW... conversa vai conversa vem, saiu esse fix p/ que usa a WVW
Obs, eu não uso a WVW, mas sei que muitos usam.


function VXBscroller(nWinNum, XBid, XBmsg, XBpos)
* generic VXBscroller
static snlasttrack := NIL
local hotreturn, keypress := 0
local aInfo, nrelative, nratio

  * if we can't handle non topmost window we must return right away
  if nWinNum <> wvw_nNumWindows()-1 ; return NIL ; endif

  do case
     case XBmsg == SB_LINEUP
        keypress := K_UP
     case XBmsg == SB_LINEDOWN
        keypress := K_DOWN
     case XBmsg == SB_PAGEUP
        keypress := K_PGUP
     case XBmsg == SB_PAGEDOWN
        keypress := K_PGDN

     case XBmsg == SB_THUMBTRACK
        aInfo := wvw_xbinfo( nWinNum, XBid )
        if snlasttrack==NIL
           snlasttrack := aInfo[4] //last position
        endif
        * are we moving?
        if snlasttrack==XBpos
           * no, do nothing.
           return NIL
        endif

        * are we moving to TOP?
        if XBpos==aInfo[1] //min
           zbgotop(,.t.)
           zbredisp()
           snlasttrack := XBpos
           return NIL
        endif

        * are we moving to BOT?
        if XBpos+aInfo[3]>aInfo[2] //pos+page>max
           zbgobottom()
           zbredisp()
           snlasttrack := XBpos
           return NIL
        endif

        * what's the relative position to current track pos?
        nrelative := XBpos - snlasttrack
        * must convert nrelative to records unit
        nratio := zvscrollratio(nWinNum+1)
        if nrelative>0
           zblinedown(.t., nrelative*nratio)
        else
           zblineup(.t., -nrelative*nratio)
        endif

        * update snlasttrack
        snlasttrack := XBpos

        return NIL

     case XBmsg == SB_THUMBPOSITION
        aInfo := wvw_xbinfo( nWinNum, XBid )

        if snlasttrack==NIL
           * weird, do nothing
           return NIL
        endif
        * are we moving?
        if snlasttrack==XBpos
           * no, do nothing. but first clear the snlasttrack
           snlasttrack := NIL
           return NIL
        endif

        * are we moving to TOP?
        if XBpos==aInfo[1] //min
           zbgotop(,.t.)
           zbredisp()
           snlasttrack := XBpos
           return NIL
        endif

        * are we moving to BOT?
        if XBpos+aInfo[3]>aInfo[2] //pos+page>max
           zbgobottom()
           zbredisp()
           snlasttrack := XBpos
           return NIL
        endif

        * what's the relative position to current track pos?
        nrelative := XBpos - snlasttrack
        * must convert nrelative to records unit
        nratio := zvscrollratio(nWinNum+1)
        if nrelative>0
           zblinedown(.t., nrelative*nratio)
        else
           zblineup(.t., -nrelative*nratio)
        endif

        * reset snlasttrack
        snlasttrack := NIL

        return NIL

  endcase

  if ( (hotreturn:=ASCAN(keylist, {|x| x[1]==keypress})) > 0 )
     xRunKeyList(hotreturn, @keypress)
  endif

return NIL

</quote>

regards,
budyanto


O FIX é p/ esse problema.
Hello Budyanto,

First of all GTWVW is a remarkable library. Thank you.

When you have some time, please look at vertical scroll bar. Thumb track can not be dragged to the end of a list of selected records when this list contains more that 65000 records.


Saudações,
Itamar M. Lins Jr.
Avatar de usuário

Itamar M. Lins Jr.
Colaborador

Colaborador
 
Mensagens: 6949
Data de registro: 30 Mai 2007 11:31
Cidade/Estado: Ilheus Bahia
Curtiu: 312 vezes
Mens.Curtidas: 506 vezes



Retornar para Harbour

Quem está online

Usuários vendo este fórum: Nenhum usuário registrado online e 8 visitantes


Ola Amigo, espero que meu site e forum tem lhe beneficiado, com exemplos e dicas de programacao.
Entao divulgue o link da Doacao abaixo para seus amigos e redes sociais ou faça uma doacao para o site forum...
MUITO OBRIGADO PELA SUA DOACAO!
Faça uma doação para o forum
cron
v
Olá visitante, seja bem-vindo ao Fórum Clipper On Line!
Efetue o seu login ou faça o seu Registro