|
Post by Ronnie on Jun 3, 2018 12:19:19 GMT -5
Hi - I am so new to Liberty Basic that I am still learning to crawl. Playing with some code I am trying to create a general font size for the entire program (Listboxes, Textboxes, text). In do so I have found several examples for each component: print #handle, "!font Ariel 18." One example had an exclamation mark and the other did not. I also saw some other code with and without an exclamation mark.
My question is why is there an exclamation mark and when should it be used (these may be the same question...). Also, how do I create one font for my entire program Thank You...
|
|
|
Post by Chris Iverson on Jun 3, 2018 14:13:30 GMT -5
You use the exclamation point in a command to a control when said command could otherwise be misinterpreted. Many controls that have text allow you to change what the text says by sending the new text to it as a command. Some don't.
If you can change the text, and you send that control the string "font Arial", it doesn't know whether you want to change the text to the words "font Arial", or change the control's display font to Arial. So you use the exclamation point to say "this is a command, not what I want the control to say."
|
|
|
Post by Carl Gundel on Jun 3, 2018 18:38:50 GMT -5
Hi - I am so new to Liberty Basic that I am still learning to crawl. Playing with some code I am trying to create a general font size for the entire program (Listboxes, Textboxes, text). In do so I have found several examples for each component: print #handle, "!font Ariel 18." One example had an exclamation mark and the other did not. I also saw some other code with and without an exclamation mark. My question is why is there an exclamation mark and when should it be used (these may be the same question...). Also, how do I create one font for my entire program Thank You... If a control accepts text, such as a textbook or texteditor, or a window opened for text then these need to have a ! in front of a command or else the string will just be printed into the control or window. The ! tells Liberty BASIC to treat that string as a command. Does this help?
|
|
|
Post by Ronnie on Jun 5, 2018 6:43:57 GMT -5
Carl / Chris - Thank you for the explanation. I think I know know the difference. Take care... Ronnie
|
|