Page 1 of 1
TMultiGet():New()
Posted: Thu Nov 30, 2006 8:22 pm
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,
Re: TMultiGet():New()
Posted: Fri Dec 01, 2006 8:36 am
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
Posted: Fri Dec 01, 2006 9:36 pm
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
Posted: Fri Dec 01, 2006 10:42 pm
by Enrico Maria Giordano
In my sample there is not a normal GET. Look at the MEMO clause:
EMG
Posted: Sat Dec 02, 2006 1:18 am
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.
Now it work fine.
Thanks,
Regards,
Gilbert