Post by jarychk on Jul 8, 2024 0:33:24 GMT
This block of code does not run in Just BASIC, but exactly why is not clear, but I find no need to make it run.
THIS example program runs fine:
Seeming to not be important if CR+LF, or if LF+CR.
Watch the start of each notice box. In both of them, I only use chr$(13) for separating the title bar from the rest of the displaying contents.
[button3Click] 'Perform action for the button named 'button3'
'Insert your own code here
notice "line feed, only"+chr$(13)
+"Line One"+chr$(10) _
+"LINE two"+chr$(10) _
+"line three"
wait
THIS example program runs fine:
nomainwin
WindowWidth = 520
WindowHeight = 320
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
button #main.button1, "example cr then lf", [button1Click], UL, 38, 91, 176, 25
button #main.button2, "example lf and then cr", [button2Click], UL, 294, 91, 184, 25
''button #main.button3, "what if only lf ?", [button3Click], UL, 38, 181, 160, 25
open "CRLF LFCR ?" for window as #main
print #main, "trapclose [quit.main]"
print #main, "font ms_sans_serif 10"
wait
[quit.main]
Close #main
END
[button1Click] 'Perform action for the button named 'button1'
'Insert your own code here
notice "cr then lf"+chr$(13) _
+"Line one"+chr$(13)+chr$(10) _
+"Line two"+chr$(13)+chr$(10) _
+"line three"
wait
[button2Click] 'Perform action for the button named 'button2'
'Insert your own code here
notice "lf then cr"+chr$(13) _
+"Line one"+chr$(10)+chr$(13) _
+"line TWO"+chr$(10)+chr$(13) _
+"line Three"
wait
Seeming to not be important if CR+LF, or if LF+CR.
Watch the start of each notice box. In both of them, I only use chr$(13) for separating the title bar from the rest of the displaying contents.