
strFilename = Form.ShowFileSaveDialog()
sgnCustomer.SaveBitmapFile(strFilename)
Note:
strFilename – a Form Variable, string filename.
Form.ShowFileSaveDialog() – Form method opens a “Save As” dialog window where user can select the file to save. Returns the filename as a string.
sgnCustomer – a Form control, scribble containing a signature.
strFilename = Form.ShowFileOpenDialog()
binaryTmp = File.LoadBinary(strFilename)
sgnCustomer.LoadBinary(binaryTmp)
Note:
strFilename – a Form Variable, string filename.
Form.ShowFileOpenDialog() – Form method opens as “Open” dialog window where user can select the file to open. Returns the filename as a string.
binaryTmp – a Form Variable, base64Binary blob.
File.LoadBinary(strFilename) – File method loads the binary file specified into a binary (blob) object and returns the contents of the file.
sgnCustomer – a Form control, scribble containing a signature.
After loading, the drawable dimensions of the scribble control will match those of the image.
If the image is larger than the scribble control, and scrolling is enabled for the control, scrollbars will appear/be accessible.
strFilename = Form.ShowFileOpenDialog()
sgnCustomer.LoadFile(strFilename)
Note:
strFilename – a Form Variable, string filename.
Form.ShowFileOpenDialog() – Form method opens as “Open” dialog window where user can select the file to open. Returns the filename as a string.
sgnCustomer – a Form control, scribble containing a signature.
After loading, the drawable dimensions of the scribble control will match those of the image.
If the image is larger than the scribble control, and scrolling is enabled for the control, scrollbars will appear/be accessible.
scribble1 = image1
Note:
scribble1 – the target scribble control to load the image in.
image1 – a cached image on the form; may not necessarily be visible in the layout
After loading, the drawable dimensions of the scribble control will match those of the image.
If the image is larger than the scribble control, and scrolling is enabled for the control, scrollbars will appear/be accessible.
IF Form.MessageBox("Warning", "Do you really wish to reset ?", MB_YESNO) == IDYES
}
sgnCustomer.Reset()
}
Note:
Form.MessageBox("Warning", "Do you really wish to reset ?", MB_YESNO) – Form Object, Message Box returning a IDYES/IDNO response.
sgnCustomer – a Form control, scribble containing a signature.
IF checkboxEnable == false
{
sgnCustomer.Disable()
}
ELSE
{
sgnCustomer.Enable()
}
Note:
checkboxEnable – a Form control, check box used as a flag in this instance to enable or disable the scribble.
sgnCustomer – a Form control, scribble containing a signature.
The user will not be able to edit the scribble while it is disabled.
IF boolShow == false
{
sgnCustomer.Hide()
}
ELSE
{
sgnCustomer.Show()
}
Note:
boolShow – a Form Variable, used as a flag in this instance to check whether to display or hide the scribble.
sgnCustomer – a Form control, scribble containing a signature.
The scribble will not be visible on the form when it is hidden.
strFilename = Form.ShowFileSaveDialog()
sgnCustomer.SaveJPEGFile(strFilename)
Note:
strFilename – a Form Variable, string filename.
Form.ShowFileSaveDialog() – Form method opens a “Save As” dialog window where user can select the file to save. Returns the filename as a string.
sgnCustomer – a Form control, scribble containing a signature.
The scribble control may be placed in a state where instead of free drawing, start and end vector points may be defined on the canvas, based on a grid. In this mode, tapping and holding the control will specify a start point, dragging will preview the line, and releasing the tap and hold gesture will commit the line to the control.
While this mode and snap size may be specified via control properties in BrightBuilder, it may also be set programmatically via the following methods:
scribble1.EnableSnapToGrid(true)
local.vGridSize = 20
scribble1.SetGridSize(vGridSize)
Note:
local.vGridSize - the grid points which start and end points of lines will snap to
scribble1 – the scribble control to be placed in grid mode.
Scribble controls may incorporate undo/redo functionality, such that each continuous line drawn in the control is recorded, and may be stepped through for the control. This may be activated programmatically via the following method:
scribble1.EnableUndoRedo(true)
Once activated for a scribble control, the following methods may be used to undo and redo changes to the control:
// Undo last line drawn
scribble1.Undo()
// Redo last line undone
scribble1.Redo()
Note:
scribble1 – the scribble control to activate undo/redo functionality.
If there are no further steps to undo, the Undo command will have no effect. Similarly, Redo will have no effect if there are no lines undone.
Loading/setting an image to the control will reset the undo/redo history of the control.