TMultiGet():New()

Post Reply
Gilbert
Posts: 74
Joined: Thu Oct 20, 2005 4:30 pm
Location: Canada

TMultiGet():New()

Post by Gilbert »

Hi All,

Ì have a string of text that I want to display in a Multiline get. No matter what I use at end of each lines (CRLF, CR, LF or Chr(141) + Chr(10)) it has no effect on the display. All I get is my text with BAR character everywhere I`ve put in a line feed or carriage return.

In Clipper MemoEdit() usually a Char(141) + Chr(10) will force line feed.
Is it different with Fivewin ?

Regards,
Gilbert Vaillancourt
turbolog@videotron.ca
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: TMultiGet():New()

Post by Enrico Maria Giordano »

Try this sample:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL oGet, cVar := "This is a test" + CRLF + "The second line"

    DEFINE DIALOG oDlg

    @ 0, 0 GET oGet VAR cVar MEMO

    oDlg:bStart = { || oGet:SetPos( 0 ) }

    ACTIVATE DIALOG oDlg;
             ON INIT oDlg:SetControl( oGet );
             CENTER

    RETURN NIL
EMG
Gilbert
Posts: 74
Joined: Thu Oct 20, 2005 4:30 pm
Location: Canada

Post by Gilbert »

Hi again Enrico,


Not sure if that`s what I need but I still will give it a try.

What I really am doing is a long text that I would like to display into TMultiGet() with a vertical schroll bar so that displayed information can be read from top to bottom. In this case the information that needs to be displayed will not fit in the get frame, I need to schroll up and down. That`s why I`m using TMultiGet(). The lines are not necessarly filled and I have to place someking of control in order to skip to the next line. I tried with Chr(13), Chr(10), Chr(13) + Chr(10, Chr(141), Chr(141) + Chr(10) (Like in Clipper MemoEdit() but none of those combination forces the line skip to happen.

If your`re proposed solution works out in a normal Get, I don`t understand why it should not work in a MultiGet.

Regards,

Gilbert
Gilbert Vaillancourt
turbolog@videotron.ca
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

In my sample there is not a normal GET. Look at the MEMO clause:

Code: Select all

@ 0, 0 GET oGet VAR cVar MEMO
EMG
Gilbert
Posts: 74
Joined: Thu Oct 20, 2005 4:30 pm
Location: Canada

Post by Gilbert »

Hi Enrico,

Ooops...

Testing your sample code, wich did behave exactly like my code, I discoverd that my define for CRLF was Chr(10) + Chr(13) instead of the other way around. :oops: :oops: :oops: :oops:

Now it work fine.

Thanks,
Regards,

Gilbert
Gilbert Vaillancourt
turbolog@videotron.ca
Post Reply