Hi ! i wrote text on an ImagePad with this block:
How could i determine the width of this text on the ImagePad. The font isn't monospace like with the Write block...
Thank you !
Hi ! i wrote text on an ImagePad with this block:
How could i determine the width of this text on the ImagePad. The font isn't monospace like with the Write block...
Thank you !
Good question! I'll include it in the next version. For now, the following block will help (if JavaScript is enabled):
Oh, sorry, the block is a reporter, so better use
instead of report SciSnap! error.
Thank you very much.
At the same time, maybe adding an "height of text" block!
It work well if the text is already displayed on the image pad, but i want to know the width before displaying the image pad...
(the window as a default width, but if the title is too long, i will be able to enlarge the window)
If you can't know the width of a string without displaying it, i can redraw the window after displaying it if the title is to large...
There are a few style attributes that affect the text length. Redrawing is therefore probably the easiest thing to do. If it bothers you, you can hide the ImagePad after initialization.
ok, thank you for your time