F fishworld2006 Member Aug 25, 2008 #1 How can i change the color of text in textbox? Such as the color of first line text is red,and the second line is blue? I can use API GetDC/SetTextColor/TextOut in VB to implement, how can I do the same thing in Basic4PPC? Tks.
How can i change the color of text in textbox? Such as the color of first line text is red,and the second line is blue? I can use API GetDC/SetTextColor/TextOut in VB to implement, how can I do the same thing in Basic4PPC? Tks.
Erel B4X founder Staff member Licensed User Longtime User Aug 25, 2008 #2 The TextBox control can only display text with a single color. For example: B4X: TextBox1.FontColor = cBlue These API calls will not help as the underlying control doesn't support more than one color. You will need to use agraham's Web browser control: http://www.b4x.com/forum/additional-libraries/1862-web-browser-desktop-device.html Or dzt'z HTMLView library: http://www.b4x.com/forum/additional-libraries/782-htmlview-library.html (Both are only available to licensed users.)
The TextBox control can only display text with a single color. For example: B4X: TextBox1.FontColor = cBlue These API calls will not help as the underlying control doesn't support more than one color. You will need to use agraham's Web browser control: http://www.b4x.com/forum/additional-libraries/1862-web-browser-desktop-device.html Or dzt'z HTMLView library: http://www.b4x.com/forum/additional-libraries/782-htmlview-library.html (Both are only available to licensed users.)