It’s possible to draw a label with drawinto into a graphics object ?
Did you try? the answer is yes.
yes i tryed but nothing happens
this is my code
dim p as picture
dim l as new label
l.text = "long text"
l.TextColor = &cd0d0d000
l.MultiLine = true
p = newpicture(settings.Width-20,40,32)
You label does not exist, unless you already have an l label in a controlset. You cannot instantiate labels by simply newing them otherwise.
See http://documentation.xojo.com/index.php/New " examples to create a new button.
Drag a label to the window, and it will work.
Why not just use DrawString?
It has an option WrapWidth parameter, which is basically ‘pretend the text is inside a multirow label of this width’
g.forecolor = &cd0d0d000
g.DrawString("Long Text", 10,130, 123) // 123 is an arbitrary wrapping width here
This simplistic code doesnt paint the text with a solid white background, however.