What's the easiest way to add word-wrapped text to a ButtonImage gadget?
Thank you.
ButtonImage with Word Wrap
Re: ButtonImage with Word Wrap
The best is to create a own gadget with CanvasGadget.
Help function for word-wrap: Link: DrawTextBox or DrawVectorTextBox
Help function for word-wrap: Link: DrawTextBox or DrawVectorTextBox
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: ButtonImage mit Word Wrap
If the gadget becomes narrower, line breaks are triggered,
which makes the text not fit into the gadget anymore, because it has more lines.
The word wrap functions of the OS, do not take this into account when calculating the text height.
DrawVectorParagraph() has word wrap included.
With custom word wrap functions you can count line breaks,
but this does not solve the problem of the resulting changes in text height.
It is simply that the text must fit into the gadget.
The simple solution is you try to use smaller text or fonts.
The better solution is to fit any text automatically into the gadget.
There are already these things ready, you just have to look for them a little bit.
There is just not much of it, because the programming is difficult.
which makes the text not fit into the gadget anymore, because it has more lines.
The word wrap functions of the OS, do not take this into account when calculating the text height.
DrawVectorParagraph() has word wrap included.
With custom word wrap functions you can count line breaks,
but this does not solve the problem of the resulting changes in text height.
It is simply that the text must fit into the gadget.
The simple solution is you try to use smaller text or fonts.
The better solution is to fit any text automatically into the gadget.
There are already these things ready, you just have to look for them a little bit.
There is just not much of it, because the programming is difficult.
地球上の平和