My app has hundreds of lines that measure the width a string:
integer = canvas.Graphics.stringWidth( wordmeasured )
I haven’t run the app in a while, but when I do now I get an error message
Type “Canvas” has no member named “Graphics”
I assume the old code was deprecated, but what replaced it?
DaveS
(DaveS)
2
That was deprecated years ago. All drawing on a canvas must take place INSIDE the PAINT EVENT
[quote=460938:@Bill Mounce]My app has hundreds of lines that measure the width a string:
integer = canvas.Graphics.stringWidth( wordmeasured )
I haven’t run the app in a while, but when I do now I get an error message
Type “Canvas” has no member named “Graphics”
I assume the old code was deprecated, but what replaced it?[/quote]
Why not do a search in the forum. That question was aswered a lot of times…
jim_mckay
(jim mckay)
4
If you’re just using it to measure strings, just use a picture’s graphics property…
just make sure you set the pictures graphics text font text size etc etc to the values you need