B4J Question Save to text file with different fonts

strupp01

Active Member
Licensed User
Longtime User
I want to save data to a text file, but use the font size, bold, and underscore as needed. To do this, use a program copied from the Internet with mogifications for my program. How can you set font there etc. or is there another way?

Writer.Initialize(File.OpenOutput(File.DirDefaultExternal, "1.txt", False))
For i = 0To7
Writer.WriteLine("/* */")
Writer.WriteLine("ALM_NUM: " & i)
Writer.WriteLine("ALM_OUT: 0xF")
Writer.WriteLine("ALM_MASK: 0")
Writer.WriteLine("ALM_CHG: 0")
Writer.WriteLine("ALM_STATUS: 0x11")
Writer.WriteLine("ALM_SCNEW: begin")
Writer.WriteLine(" info")
Writer.WriteLine(" end")
Writer.WriteLine("ALM_SCOLD: begin")
Writer.WriteLine(" info")
Writer.WriteLine(" end")
Next
Writer.Close

For example:
introduction
This is a test
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
txt files doesnt keep any font.

if what you want to do is to show that txt to the user. It may be better to save it as a html file.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0
Top