AddText ignoring textformat (bug?)

Hello
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.

It is already allowed. This is the icon at the left of the one that have <> inside and named Image when the MouseCursor is above it :wink:

Farai, you can’t upload an image to this forum directly, you can use imgbb.com to upload your image and past the link to the image within img tags:

[img].your.link.here.[/img]

Edit: post formatting tips https://forum.xojo.com/38560-post-formatting-tips

@Emilie Schwarz: I’ve seen that but that doesn’t allow me to upload images directly. I have first to upload the image somewhere else, create a link and then insert here…

Same for URLs… to text data (web pages).

Edit: you are correct, the image is not stored in Xojo web, you have to store it where you want and pass the URL to the forum in the code.