May 03, 2024, 01:47:53 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


cr/lf in a RichEdit Control

Started by tbohon, November 07, 2008, 11:35:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tbohon

OK, I am admittedly a bit slow this week - busy, busy, busy at work - but for the life of me I can't get a simple cr/lf inserted into a RE control.

Can someone take pity on a poor confused old man and straighten me out on this?  ;D

Tnx.

Tom

"If you lead your life the right way, the karma will take care of itself ... the dreams will come to you."  -- Randy Pausch, PhD (1961-2008)

GWS

Hello Tom ..  :)

I don't know if this is what you're after .. of course just pressing the Enter key during user text input does the same thing ..  ;)


def w:WINDOW
def wstyle:int
def a:string

wstyle = @SIZE|@MINBOX|@MAXBOX

WINDOW w,50,50,800,600,wstyle,0,"Window Title",main
SETWINDOWCOLOR w,RGB(0,0,90)

CONTROL w,"B,Exit,(800-80)/2, 500, 80, 40, 0, 1"

control w,"RE,,(800-300)/2,100,300,200,@CTEDITMULTI|@CTEDITRETURN,2"
SETCONTROLCOLOR w, 2, 0, rgb(0,160,200)

setcontroltext w,2,"This is a very" + chr$(10) + "long line."

WAITUNTIL w = 0

END

SUB main
SELECT @CLASS
case @IDCLOSEWINDOW
closewindow w
' clicking the Exit button ...
case @IDCONTROL
select @CONTROLID
case 1
closewindow w
endselect
endselect
RETURN



best wishes, :)

Graham

Tomorrow may be too late ..

tbohon

The chr$(10) was about the only thing I didn't try ... was looking for a predefined constant, tried chr$(13)+chr$(10) ...

Thanks, Graham - appreciate it.

Tom

"Getting old is not for wimps!"
"If you lead your life the right way, the karma will take care of itself ... the dreams will come to you."  -- Randy Pausch, PhD (1961-2008)

LarryMc

Quote"Getting old is not for wimps!"
My mother's version of that (when she had bypass surgery in her mid 70s) was
"Getting old is not for sissys"

Either way is true!

Larry
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library