//Image Example
Image1.onclick= function() {
alert("Click!");
}
// To change an image at runtime, use
QRCode1.setValue(Input1.value);
// The functions can also be called directly:
QRCode.toCanvas(QRCode1, "george")Line 55: | Line 55: | ||
QRCode1.setValue(Input1.value); | QRCode1.setValue(Input1.value); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
// The functions can also be called directly: | |||
QRCode.toCanvas(QRCode1, "george") | |||
|-| | |-| | ||
BASIC= | BASIC= | ||
Line 64: | Line 67: | ||
' To change a QRCode at runtime, use | ' To change a QRCode at runtime, use | ||
QRCode1.setValue(Input1.value) | QRCode1.setValue(Input1.value) | ||
' The functions can also be called directly: | |||
QRCode.toCanvas(QRCode1, "george") | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</tabber> | </tabber> |
The QRCode control is used to display a QR Code. QR Codes are widely used to make scannable web links, but have other uses as well.
To add an image to your app, choose the QRCode icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need, then add functions to your code to respond to the events that come from the button: usually, just onclick.
The options argument on setValue is optional. Properties of it are:
name | value |
---|---|
modules | Bitmatrix class with modules data |
version | Calculated QR Code version. 1-40. Suitable value will be calculated. |
errorCorrectionLevel | Error Correction Level. "L", "M", "Q", "H". |
maskPattern | Calculated Mask pattern. Possible values are 0, 1, 2, 3, 4, 5, 6, 7. |
segments | Generated segments. See detailed docs. |
QRCode defaults to 115 x 115 pixels, but can be made larger.
QR Code uses the soldair/node-qrcode library.
Standard properties are supported, plus:
setValue(text [,options]) | The text to be converted to a QR Code. Can be a URL or any other text string. options is optional - see above. Run Time. |
value | The text to be converted to a QR Code. Can be a URL or any other text string. Design Time. |
Standard events are supported.
//Image Example
Image1.onclick= function() {
alert("Click!");
}
// To change an image at runtime, use
QRCode1.setValue(Input1.value);
// The functions can also be called directly:
QRCode.toCanvas(QRCode1, "george")
Function QRCode1_onclick()
Msgbox "Click!"
End Function
' To change a QRCode at runtime, use
QRCode1.setValue(Input1.value)
' The functions can also be called directly:
QRCode.toCanvas(QRCode1, "george")