FWH MGET control 'GoBottom()' method does not work

FWH MGET control 'GoBottom()' method does not work

Postby peterk » Fri Sep 15, 2006 2: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
peterk
 
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm

Postby Antonio Linares » Fri Sep 15, 2006 7:46 am

Peter,

This test works ok, could you please check it there and confirm us if it works ok for you ? thanks
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby peterk » Mon Sep 18, 2006 8: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
peterk
 
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm

Postby Antonio Linares » Mon Sep 18, 2006 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Sep 18, 2006 8:48 am

Peter,

Solved:
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby peterk » Mon Sep 18, 2006 8: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
peterk
 
Posts: 47
Joined: Thu Jul 13, 2006 2:39 pm

Postby Antonio Linares » Mon Sep 18, 2006 9:22 am

Peter,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests