Backspace Button

Hello all,

I am working on creating my own On-Screen Keyboard and I have all of the buttons figured out aside from the backspace button. Does anyone know how I could make this button delete the very last character of my text field on action performed? I tried using len() and cutting it that way but that didn't seem to work as it cannot include both unicode and int.

Thanks in advance.

Maybe see how this resource works?

Or, just use the resource. :slight_smile:

This is another option, Ignition Exchange | Inductive Automation

1 Like

Downloaded & opened and I don't see any views :smiling_face_with_tear:

Strings are iterables, so you can use slicing to achieve your purpose.

test = 'myString'
newString = test[:-1]
print newString
1 Like

Thank you very much! I am still getting used to iterations

They are there. I see you marked as solved, but I would spend the time to learn how they present resources so you will know for next time.

1 Like