|
Post by Carl Gundel on Sept 17, 2020 21:48:35 GMT -5
I took a ride off onto a side path and added something I think people will appreciate.
#mainwin color("blue") print "The quick brown "; #mainwin color("red") print "red fox "; #mainwin color("purple") print "jumped over "; #mainwin color("darkgreen") print "the green frog." print #mainwin debug$()
|
|
|
Post by tsh73 on Sept 18, 2020 1:12:40 GMT -5
Carl, thanks but a little screenshot would be really nice here Does it change foreground color? or background? Or there is a possibilty to change both? Also, is it possible to set mainwin to read only (a command or option) so it could be copied but cannot be pasted to (it does not work with input anyway) and cannot be messed with by changing cursor position by mouse click?
|
|
|
Post by Chris Iverson on Sept 18, 2020 1:22:17 GMT -5
I'm guessing that's foreground color/text color, based on what's written.
|
|
|
Post by Rod on Sept 18, 2020 3:43:07 GMT -5
Yes I was thinking only foreground since the mainwin background has a lways been white. So the color change is great but of course color fans will want to change the background. Not me, black on white text is just fine. syntax color great but thats about it for text meant to be read. Game text, scores etc different issue.
What I am most looking forwards to is the LB5 command syntax, help file document. Could we start building it online?
|
|
|
Post by Carl Gundel on Sept 18, 2020 7:25:54 GMT -5
I'm guessing that's foreground color/text color, based on what's written. Yup. 😉
|
|
|
Post by Carl Gundel on Sept 18, 2020 8:34:18 GMT -5
Carl, thanks but a little screenshot would be really nice here Does it change foreground color? or background? Or there is a possibilty to change both? Also, is it possible to set mainwin to read only (a command or option) so it could be copied but cannot be pasted to (it does not work with input anyway) and cannot be messed with by changing cursor position by mouse click? This only lets you set the text color. For the moment that's all it is.
|
|
|
Post by Carl Gundel on Sept 18, 2020 11:09:53 GMT -5
I'm guessing that's foreground color/text color, based on what's written. It also demonstrates the treatment of the main window as an object like other widgets, so more stuff can follow.
|
|
|
Post by Carl Gundel on Sept 19, 2020 15:29:49 GMT -5
Carl, thanks but a little screenshot would be really nice here Does it change foreground color? or background? Or there is a possibilty to change both? Also, is it possible to set mainwin to read only (a command or option) so it could be copied but cannot be pasted to (it does not work with input anyway) and cannot be messed with by changing cursor position by mouse click? This only lets you set the text color. For the moment that's all it is. Okay I lied. Here is the list so far. - Added global #mainwin which points to the program's main window. Also added a few functions to start: contents$() - Return a string containing the entire text. cls() - Clear to an empty string. lines() - Return the number of lines of text. line$(n) - Return the nth line of text. selection$() - Return the selected text, or an empty string. color(expr$) - Set color of following printed text to be one of the predefined colors (i.e. red, blue, green, yellow, etc.) debug$() - Return "MAINWINDOW"
|
|
|
Post by Carl Gundel on Sept 20, 2020 19:24:47 GMT -5
I added a backcolor() function to set the background color of the main window. This affects only the color of the entire text area of the window, not the background color of specific text.
|
|