FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GET ... MEMO How to display last line?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
GET ... MEMO How to display last line?
Posted: Wed Sep 28, 2022 08:43 AM

Hi,
How to programmatically go to the last line of a TMultiGet control (GET...MEMO) ?
With the keyboard I had to click on the control to give it focus then press Ctrl+End

TIA

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: GET ... MEMO How to display last line?
Posted: Wed Sep 28, 2022 08:51 AM

Dear Hua,

Using VB they solve it this way:
Text1.SelStart = len(Text1.Text)

Have you tried oMultiGet:GoBottom() ?

Also you could try oMultiGet:SetPos( Len( oMultiGet:cText ), Len( oMultiGet:cText ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: GET ... MEMO How to display last line?
Posted: Wed Sep 28, 2022 10:07 AM

Thanks for the prompt reply Antonio.
No luck yet so far

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: GET ... MEMO How to display last line?
Posted: Wed Sep 28, 2022 10:23 AM
I'm using this modified method (you can change it to a function):

Code (fw): Select all Collapse
METHOD GoBottom() CLASS TMultiGet

    LOCAL nPos := LEN( ::VarGet() ) + 1

    ::SendMsg( EM_SETSEL, nPos, nPos )

    ::SendMsg( EM_LINESCROLL, 0, ::SendMsg( EM_GETLINECOUNT ) )

    RETURN NIL
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: GET ... MEMO How to display last line?
Posted: Thu Sep 29, 2022 01:19 AM

Enrico,
That works! Thanks a lot!

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion