FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH MGET control 'GoBottom()' method does not work
Posts: 47
Joined: Thu Jul 13, 2006 02:39 PM
FWH MGET control 'GoBottom()' method does not work
Posted: Fri Sep 15, 2006 02:42 AM

Antonio
This appears to be a bug
16 bit works correctly and the Mget control displays the text at the bottom and scrolls the vertical scroll bar to the bottom (same as TWBrowse), but 32 bit does not, it seems to ignore the message

Please can you check and advise

Extract of code below:
//-----------------------------------------------------------------------------------METHOD AddToLog ( pcItem ) CLASS qFileSnd
/
Purpose
Add a line to the log mget
/

::cLog                     += Time() + ": " + pcItem + CRLF
::oMGet:SetText( ::cLog )
::oMget:GoBottom()

RETURN .t.

Regds
Peter

Peter
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FWH MGET control 'GoBottom()' method does not work
Posted: Fri Sep 15, 2006 07:46 AM
Peter,

This test works ok, could you please check it there and confirm us if it works ok for you ? thanks
#include "Fivewin.ch" 

FUNCTION MAIN() 

    LOCAL oDlg 
    LOCAL oGet, cVar := "Hello World!" + CRLF + "This is a test"

    DEFINE DIALOG oDlg 

    @ 1, 1 GET oGet VAR cVar MEMO SIZE 80, 30

    @ 3, 1.5 BUTTON "&Close"; 
           ACTION oDlg:End() 

    @ 3, 8.5 BUTTON "&Bottom"; 
           ACTION ( oGet:GoBottom(), oGet:SetFocus() )

    ACTIVATE DIALOG oDlg ; 
             CENTER 

RETURN NIL
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 47
Joined: Thu Jul 13, 2006 02:39 PM
FWH MGET control 'GoBottom()' method does not work
Posted: Mon Sep 18, 2006 08:04 AM

Hi Antonio
Please try the followiing:

FUNCTION MAIN()

LOCAL oDlg
LOCAL oGet, cVar := "Hello World!" + CRLF + "This is a test"

    cVar += CRLF + "Line 2"
    cVar += CRLF + "Line 3"
    cVar += CRLF + "Line 4"
    cVar += CRLF + "Line 5"
    cVar += CRLF + "Line 6"
    cVar += CRLF + "Line 7"
    cVar += CRLF + "Line 8"
    cVar += CRLF + "Line 9"
    cVar += CRLF + "Line 10"


DEFINE DIALOG oDlg

@ 1, 1 GET oGet VAR cVar MEMO SIZE 80, 30

@ 3, 1.5 BUTTON "&Close";
       ACTION oDlg:End()

@ 3, 8.5 BUTTON "&Bottom";
       ACTION ( oGet:GoBottom(), oGet:SetFocus() )

ACTIVATE DIALOG oDlg ;
         CENTER

RETURN NIL

Peter
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FWH MGET control 'GoBottom()' method does not work
Posted: Mon Sep 18, 2006 08:44 AM

Peter,

Yes, I see what you mean. The GET is not scrolling down in 32 bits. In 16 bits it works fine and its the same code.

We are going to search for a way to do it.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FWH MGET control 'GoBottom()' method does not work
Posted: Mon Sep 18, 2006 08:48 AM
Peter,

Solved:
#define EM_LINESCROLL  0x00B6
...
@ 3, 8.5 BUTTON "&Bottom"; 
ACTION ( oGet:GoBottom(), oGet:SendMsg( EM_LINESCROLL, 0, oGet:GetLineCount() ), oGet:SetFocus() )

We are going to modify Class TMGet to do it automatically.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 47
Joined: Thu Jul 13, 2006 02:39 PM
FWH MGET control 'GoBottom()' method does not work
Posted: Mon Sep 18, 2006 08:55 AM

Thanks

Will you be modifing the FWH mget class GoBottom() method ?
If so can you let me have the modified method please

Regds
Peter

Peter
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FWH MGET control 'GoBottom()' method does not work
Posted: Mon Sep 18, 2006 09:22 AM

Peter,

METHOD GoBottom() INLINE ( ::SetPos( Len( AllTrim( ::GetText() ) ) + 1 ),;
::SendMsg( EM_LINESCROLL, 0, ::GetLineCount() ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion