Ruby In-place Edit Controls
Posted: Wed May 15, 2019 3:15 pm
Quoting the manual:
This seems to work fine without the array brackets up to and including the Font option.
I can't get the textColour, backColour and multiline options to work though.
The commas are obviously in the wrong place but I still can't get these options to work no matter what I try.
Has anyone got any ideas how to get this to work or am I missing something simple? (wouldn't be the first time )
Also the position has to be adjusted to be in the same location as the original text but I can live with that.
Thanks in advance for any help
Dave
Edit controls are pretty much essential for gathering precise numerical or text input. You can create an
in place edit control on-the-fly whenever you need to get information by using the createEdit method:
createEdit input, id, area, [startText [,font [,textColour
[,backColour [,multiline]]]]]
The inputs to the method are as follows:
input - reference to the input View connector (name or index)
id - an id that you can use on the callback so you know which edit is reporting
area - four element array [x,y,w,h] to define position and size
startText - the text that will show in the edit to start with [OPTIONAL]
font - the font to use (a font object) [OPTIONAL]
textColour - the colour of the text [OPTIONAL]
backColour - the colour of the background rectangle for the edit control [OPTIONAL]
multiline - whether the control should be a multiline edit (true or false) [OPTIONAL]
This seems to work fine without the array brackets up to and including the Font option.
I can't get the textColour, backColour and multiline options to work though.
The commas are obviously in the wrong place but I still can't get these options to work no matter what I try.
Has anyone got any ideas how to get this to work or am I missing something simple? (wouldn't be the first time )
Also the position has to be adjusted to be in the same location as the original text but I can live with that.
Thanks in advance for any help
Dave