TMultiGet():New()

TMultiGet():New()

Postby Gilbert » Thu Nov 30, 2006 8:22 pm

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
Gilbert
 
Posts: 74
Joined: Thu Oct 20, 2005 4:30 pm
Location: Canada

Re: TMultiGet():New()

Postby Enrico Maria Giordano » Fri Dec 01, 2006 8:36 am

Try this sample:

Code: Select all  Expand view  RUN
#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
User avatar
Enrico Maria Giordano
 
Posts: 8719
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Gilbert » Fri Dec 01, 2006 9:36 pm

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
Gilbert
 
Posts: 74
Joined: Thu Oct 20, 2005 4:30 pm
Location: Canada

Postby Enrico Maria Giordano » Fri Dec 01, 2006 10:42 pm

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

Code: Select all  Expand view  RUN
@ 0, 0 GET oGet VAR cVar MEMO


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8719
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Gilbert » Sat Dec 02, 2006 1:18 am

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
Gilbert
 
Posts: 74
Joined: Thu Oct 20, 2005 4:30 pm
Location: Canada


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 5 guests