Q: Null bytes and backslash characters like \t and \n in text strings display as little blobs or images in grid text.
Many fonts have images for more than common or standard ASCII characters. ASCII values from 0x20 to 0x7E represent a reliable set of standard characters. But many fonts contain character images for most or all extended characters from 0x00 to 0x1F , and from 0x80 to 0xFF . The font images for these extended characters are not consistent between fonts. Nonetheless, the images for these characters can be displayed, and in certain circumstances they are.

In most circumstances, the vast majority of extended characters display whatever image the font contains for the specified character value. But a few of these extended characters like null=0x00 , tab=0x09 , return=0x0D , newline=0x0A have common meanings. For example, when you press an enter or newline key, you usually don't expect to insert the image the font contains for the newline character ( 0x0A ), you expect the text cursor to move to the next line without drawing a character.

The only reason characters like null , tab , and newline don't display images is that input functions check for these characters and execute alternate actions. But most output/drawing functions draw the font image for every character.

For example, XgrDrawText (grid, $$Black, @"A\tB\nC") draws five characters at the current drawpoint, which will usually look something like:

A Y B W C or A B C

The character images the font contains for tab and newline are displayed. The tab does not cause blank space between the A and B , and the newline does not place the C on a separate line. When a program draws text and needs to interpret certain characters as something other than their font images, the program must perform multiple operations to draw the text. To draw the A B C example with tab and newline characters interpreted as space control characters takes three XgrDrawText() calls to draw the ABC characters, separated by two XgrSetDrawpoint() calls for tab and newline space.

Software that wants tab , newline , and possibly other extended characters to be interpreted as non-visible spacing commands or anything other than font images, must watch for these characters and take appropriate actions. A number of GuiDesigner grid types take alternate actions in response to extended characters. For example, XuiTextLine and XuiTextArea grids expand tab characters into variable width horizontal space to support alignment of text into columns. On the other hand, XuiTextLine and XuiTextArea display the font image for the other extended characters, including the newline characters. Each string in the string array assigned to the TextArray property of an XuiTextArea grid is displayed on a separate line. Any newline character in the TextArray is displayed as the 0x0A font image within the line and does not break the line.