Control Cursor with Buttons into Spinner Date format

#1

Hi
So here is what I want to do. Since the operator won’t have access to a keyboard or mouse. I want the operator change the date on the spinner to date month, day, year, hour, min and secs by moving the cursor to left and rigth to the front of the string and tap on the spinner up/down button . Like, for example: " xx/ <cursor | > 27/xx/ ".

I migth need to make some scripting on buttons and the spinner. Probably something with getCaretPosition() and setCaretPosition(), might be usefull. I already binded the spinner to the calendar and works correctly but only changes month because default position of the cursor is at the beginning of the string. I want to have that extra facility to move the cursor with the buttons.

calendar

I already made a Custom Property (int) that counts from 0-17 up or down (length of the string inside the spinner) that is controlled by buttons right and left. I just need to tell the cursor inside the spinner string to set at 0-17 position. How can I do it?

I will be very grateful to hear some ideas. Thanks. (Sorry for bad English)

0 Likes

Control Cursor with Buttons into Spinner Date format 2
#2

If you enlarge the spinner and enlarge its font, does the cursor move to the correct field when the operator touches that spot?

0 Likes

#3

Thanks for your advice. If there’s no way to use buttons to move the cursor. I’m forced to break a company paramenter in the development of the projects since the the maximun of the font I can use for a project is limitated.

0 Likes