You can click on the [qlist] object or send [click( in a message and this will open an editor, after editing, close the editor and a dialog box asks if you wish to save, click yes. This only saves to memory, you will need to use the [write( message to make it permanent.
@Balwyn The cursor is not working here...
I can't see what would prevent the cursor from showing, other than pressing the enter key.
The cursor is inactive until the box is clicked which starts the [metro 500] and the toggle sends $0-flash to the [drawpolygon] to turn it on and off.
However I did fail to mention usage, which I have now added to textentry-help.pd in the original post
I have also added it to the text of the original post.
Two days ago I uploaded an idea for a text entry box and asked for ideas to improve it.
@ingox showed a far superior way to achieve the text handling and a recommendation to capture a click via a struct..
I've taken the liberty of using a big chunk of ingox's code.
I've added a cursor - mostly to show the box is still active
This is the result.
Click anywhere in the box to activate, the box will be cleared and the cursor will appear and flash at left side.
After typing, press 'enter' and the box will output a symbol of the text, the cursor will be hidden indicating the box is now inactive, but the text remains until the box is clicked again
Messages are currently the only way to set the properties. Decide the number of characters and the font size first
Then make sure you are not in edit mode and type characters from the start until the maximum characters are reached
Now size the box so that the right side is the same as the text width, and centre the text up and down with textpos
All the other properties change at any point.
IMPORTANT:-DO NOT type a backspace in the box when in edit mode, it will delete the [textentry] object
IMPORTANT:-textentry is only suitable for monospace fonts
IMPORTANT:-always have the box width the same size as the width of the maximum characters typed or the cusor position will be wrong.
size nn (width height)
textcol n (struct rgb format 0-999)
backcol n (struct rgb format 0-999)
bordercol n (struct rgb format 0-999)
cursorcol n (struct rgb format 0-999)
fontsize n n (font fontsize)
textpos n n (left top)
chars n (max characters)
I've always thought Pure Data lacked a native Textbox widget that was customisable.
So because the sliders output a bang when clicked, that's what I've used as a base.
This is very much an early stage project and I am looking for input/ideas on how to improve it