Scanner (스캐너) Widget Control
This page lists the Widget Control (Property · Method · Event) available for controlling the Scanner widget from a script. To learn about the widget itself and how to use it, visit Scanner.
The scannerID in the examples below is the name (ID) you assigned to the Scanner widget on the canvas. In scripts, you access members in the form widgetID.member.
Widget Control summary
| Widget Control | Kind | Signature | Description |
|---|---|---|---|
onChanged | Event | onChanged = (lastScannedText) => { ... } | Runs when a new QR code or barcode is recognized |
Property
Not applicable — the Scanner widget has no script-only Property. In scripts, read and write values with the common Widget Control below (getProperty / setProperty).
Method
Not applicable — the Scanner widget has no dedicated Method. Use the common Widget Control below.
Event
onChanged
Runs whenever a QR code or barcode inside the scan area is newly recognized. The handler receives the text of the recognized code as an argument.
- Kind: Event
- Handler: A callback function that takes one argument
- Parameters:
lastScannedText(string) - The decoded text of the recognized code - Returns: None
Example
scannerID.onChanged = (lastScannedText) => {
// Handle the recognized code text
console.log(lastScannedText);
};
Common Widget Control (all widgets)
Every widget supports name-based common Widget Control (Method) such as setProperty, getProperty, and setStyleProperty. See the common reference doc (to be written).