I’m using the simple webgraphics boxes example with Xojo 2019R3 on my Mac which works fine.
I modifiy the code and it works fine:
[code]Sub Paint(g as WebGraphics) Handles Paint
g.ClearRect(0, 0, g.Width, g.Height)
g.ForeColor = &cff0000
g.TextFont = “Helvetica”
g.TextSize = 16
g.DrawString(“Hello world!”, 10, 130)
End Sub[/code]
I add a TextArea with some text and change the code to
[code]Sub Paint(g as WebGraphics) Handles Paint
g.ClearRect(0, 0, g.Width, g.Height)
g.ForeColor = &cff0000
g.TextFont = “Helvetica”
g.TextSize = 16
g.DrawString(TextArea1.Text, 50, 130)
g.DrawString(“Hello world!”, 10, 130)
End Sub[/code]
and nothing is shown on the webcanvas, not even the “Hello World!”.
I comment out the g.DrawString(TextArea1.Text, 50, 130)
line and it paints the “Hello World!” just fine.
I can have two .DrawString lines just fine:
g.DrawString("Hello world!", 10, 130)
g.DrawString("Jurassic world!", 10, 160)
Where am I going wrong?