If I scanned a barcode into a text field and it read: 12345-67 is there a way to make it show up as 1234567
Is there a way to remove the “dash”
If I scanned a barcode into a text field and it read: 12345-67 is there a way to make it show up as 1234567
Is there a way to remove the “dash”
Sure, you can add a propertyChange event handler to the text field component like this:if event.propertyName == "text":
value = event.newValue
value = value.replace("-", "")
def doLater(event=event, value=value):
event.source.text = value
system.util.invokeLater(doLater)