Página 1 de 1

TArrayBrowse .... using AddRow() .... Hilite to bottom of list with scrolling

Publicado: Mié Abr 06, 2016 12:31 pm
por ChrisGillard
Hi,

I should know this but I can't find where I have done it before ...

I am using a TArrayBrowse and using :Addrow() to add data rows in a loop.

I want the 'cursor' to go to the last row added AND make the TArrayBrowse scroll to show the last few messages.

I have tried
oArrayBrowse:GoBottom()
ProcessMessages()

But this does not scroll the browse.

Any thoughts please.

Rhanks

Chria

Re: TArrayBrowse .... using AddRow() .... Hilite to bottom of list with scrolling

Publicado: Mié Abr 06, 2016 4:15 pm
por ignacio
I just have tried this:

Código: Seleccionar todo

METHOD FormInitialize( oSender ) CLASS TForm1

   ::oArrayBrowse1:SetArray(Directory("*.*" ) )
   
RETURN Nil

//------------------------------------------------------------------------------

METHOD BtnBmp1Click( oSender ) CLASS TForm1

   LOCAL nFor 
   
   FOR nFor:= 1 TO 100
      ::oArrayBrowse1:AddRow( {"click!", 0, Date(), Time(), "A"} )
   NEXT
   
   ::oArrayBrowse1:GoBottom()

RETURN Nil
And has worked correctly.

REgards,

Re: TArrayBrowse .... using AddRow() .... Hilite to bottom of list with scrolling

Publicado: Jue Abr 07, 2016 10:34 am
por ChrisGillard
Hi Ignacio,

You are absolutely right :GoBottom() works perfectly.

I have on idea what I was doing when I was testing it thought it did not work!

Apologies and thank you.

Chris