QRCode: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Line 6: Line 6:


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.
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:
{| class="wikitable"
|+ Caption Options
|-
! 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. [https://github.com/soldair/node-qrcode See detailed docs].
|}


QRCode defaults to 115 x 115 pixels, but can be made larger.
QRCode defaults to 115 x 115 pixels, but can be made larger.

Revision as of 11:40, 20 December 2021

Description

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:

Caption Options
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.

Properties

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.

Events

Standard events are supported.

Example

//Image Example
Image1.onclick= function() {
  alert("Click!");
}

// To change an image at runtime, use 
QRCode1.setValue(Input1.value);

Function QRCode1_onclick()
  Msgbox "Click!"
End Function

' To change a QRCode at runtime, use 
QRCode1.setValue(Input1.value)

Output

Related Items

PictureBox