Sometimes I just take a break from heavy-duty programming and fool around... 
This is one tip which is easy to add to your programs and greatly lets you see what's happening in the log window; great to use when you're debugging things.
COLOR
The HTML Code would look like this. I was hoping that this website allowed the embedding of HTML in the code, but apparently not.
And, if you wanted to pick the characters that you think stand-out the best run this:
This is one tip which is easy to add to your programs and greatly lets you see what's happening in the log window; great to use when you're debugging things.
COLOR
B4X:
Sub Activity_Create
LogR("Test") ' Red
LogO("Test") ' Orange
LogG("Test") ' Green
LogB("Test") ' Blue
LogM("Test") ' Magenta
LogV("Test") ' Violet
LogBG("Test") ' Blue-green
end sub
Sub LogR(text As String)
Dim BktLeft As String = Chr(171) & Chr(171) & Chr(171) & " "
Dim BktRight As String = " " & Chr(187) & Chr(187) & Chr(187)
LogColor(BktLeft & text & BktRight,Colors.Red)
End Sub
Sub LogO(text As String)
Dim CopyrightL As String = Chr(169) & Chr(169) & Chr(169) & " "
Dim CopyrightR As String = " " & Chr(169) & Chr(169) & Chr(169)
LogColor(CopyrightL & text & CopyrightR,Colors.RGB(255,128,0))
End Sub
Sub LogG(text As String)
Dim ParagraphL As String = Chr(182) & Chr(182) & Chr(182) & " "
Dim ParagraphR As String = " " & Chr(182) & Chr(182) & Chr(182)
LogColor(ParagraphL & text & ParagraphR,Colors.Green)
End Sub
Sub LogB(text As String)
Dim BetaL As String = Chr(223) & Chr(223) & Chr(223) & " "
Dim BetaR As String = " " & Chr(223) & Chr(223) & Chr(223)
LogColor(BetaL & text & BetaR,Colors.Blue)
End Sub
Sub LogM(text As String)
Dim CrossL As String = Chr(134) & Chr(134) & Chr(134) & " "
Dim CrossR As String = " " & Chr(134) & Chr(134) & Chr(134)
LogColor(CrossL & text & CrossR,Colors.RGB(255,0,255))
End Sub
Sub LogV(text As String)
Dim CircleL As String = Chr(248) & Chr(248) & Chr(248) & " "
Dim CircleR As String = " " & Chr(248) & Chr(248) & Chr(248)
LogColor(CircleL & text & CircleR,Colors.RGB(128,0,255))
End Sub
Sub LogBG(text As String)
Dim LittleXL As String = Chr(215) & Chr(215) & Chr(215) & " "
Dim LittleXR As String = " " & Chr(215) & Chr(215) & Chr(215)
LogColor(LittleXL & text & LittleXR,Colors.RGB(0,153,153))
End Sub
The HTML Code would look like this. I was hoping that this website allowed the embedding of HTML in the code, but apparently not.
HTML:
<br><font color = "red">««« Test »»»</font><br>
<font color = "RGB(255,128,0)">©©© Test ©©©</font><br>
<font color = "green">¶¶¶ Test ¶¶¶</font><br>
<font color = "blue">ßßß Test ßßß</font><br>
<font color = "RGB(255,0,255)">††† Test †††</font><br>
<font color = "RGB(128,0,255)">øøø Test øøø</font><br>
<font color = "RGB(0,153,153)">××× Test ×××</font><br>
And, if you wanted to pick the characters that you think stand-out the best run this:
B4X:
Sub ShowAll(BlankString As String) as String
Dim ReturnStr As String
Dim z As Int
Dim CARRETURNLINEFEED As String = Chr(13) & Chr(10)
For z = 128 To 255
ReturnStr = ReturnStr & z & " = " & Chr(z) & CARRETURNLINEFEED
Next
Log(ReturnStr)
Return ReturnStr
end sub
Last edited: