Edit text with virtualKeyboard
MorgoZ
Posts: 116
Hello,
i need to let the user edit a button text, so the idea is to open a virtual keyboard with the text of the button loaded at the "text area-single line" input field of the virtual keyboard, and then save the changes.
The problem is that the ^TXT command doesn?t work with the "text area-single line" input field (0:4 port:address). Do you know any way load a text to an input button like that?
Thanks for your help!
Salutes!!
i need to let the user edit a button text, so the idea is to open a virtual keyboard with the text of the button loaded at the "text area-single line" input field of the virtual keyboard, and then save the changes.
The problem is that the ^TXT command doesn?t work with the "text area-single line" input field (0:4 port:address). Do you know any way load a text to an input button like that?
Thanks for your help!
Salutes!!
0
Comments
There is an old command that still works with the G4 panels - @AKB
(from the manual)
"'@AKB-<initial text>;<prompt text>'"
Pop up the keyboard icon and initialize the text string to that
specified. Keyboard string is set to null on power up and is stored
until power is lost. The Prompt Text is optional.
Syntax:
SEND_COMMAND <DEV>,"'@AKB-<initial text>;<prompt text>'"
Variables:
initial text = 1 - 50 ASCII characters.
prompt text = 1 - 50 ASCII characters.
Example:
SEND_COMMAND Panel,"'@AKB-Texas;Enter State'"
Pops up the Keyboard and initializes the text
string 'Texas' with prompt text 'Enter State'.
Sounds liek that is what you want to do
Yes, that is what i was looking for, but i?m using a personal keyboard, modified from the system keyboard, so what i exactly need is a command that changes the text, but without opening the system keyboard popup, because i will open mine (with the text changed).
So, if you know any command to just change a keyboard text input without having to automatically open the system keyboard, i would appreciate it.
Thanks!!
To do want you want you may have to really make your own and instead of using 0-setup port for buttons and the text input window assigned them the port and channel numbers in the range of the device. Then handle the button and variable text field in code. Now when you open the keyboard you can pass any stored variable into this variable text field, modify it in code and send VT back to the panel after every change.
I am using a modified system keyboard and I am sending the button text to the text input field and using the standard ^TXT command and it works without issues. I send the @PPN command to popup the keyboard and then the ^TXT command right after. Perhaps you can post your code as there might be some other reason why it isn't working.
EDIT: I am using an address code not a setup port for the input field.
Paul
--D
i?ll try with an input button.
Trying to find a solution with the system default keyboard, i didn?t see the possibility of using my own input button, thanks for opening my eyes!!
Thanks and salutes!!!
thanks,
Ian
They are sent as a string from the panel on port 1, so you need to create a DATA_EVENT with a STRING handler on that panel and port. The text is pre-pended with the label on the text field button.