I’m working on a Terminal software using SerialConnect. There is a multiline TextArea (Console window) showing the entered user commands (TextField) and the returning text from connected device.
The user can change the visual appearance of the Console window at any time: Font TextArea.FontName, TextArea.FontSize, TextArea.TextColor, TextArea.BackgroundColor and this is working fine: As soon he presses the Ok button in the setting window I set the users value. The Console looks like then as the user has set it.
Now when the user enters another command it will be copied into the Console:
TextArea.AddText ( TextField.Value.Trim + Chr(10) ) ) // or Chr(13) on Windows
The new added text will now be added/displayed with System.Font in current System.FontSize instead converted to the users fonttype/fontsize setting. Funny: The TextColor will be considered!
I would expect that any entered/copied/inserted text into a TextArea would be displayed in the way of TextAreas current format.
Now checking the documentation: “Adds the passed text to the current Text. Call AddText rather than using the + operator to add text to existing text”
Okay, let’s give it a try, just out of interest: I replace the AddText function by adding text with “+” and… it works: Any additional added text will be considered by changed FontType and FontSize! At this stage I would say: AddText is not equal to adding text by using the “+” operator.
Tested on Mac (Catalina with Xojo 2019/3.1), not sure how it behaves on Windows or Linux.
Would you consider this as bug or do I miss anything?
@Xojo: It would be great you would allow to attach images right away to conversations here. Pictures sometimes can say more than 1000 words.