Component: GLCD Textfield (Displays: Graphical)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 1.1 (Release)
Category Displays: Graphical


Image GLCD Textfield component

A component to simplify the process of drawing text to a graphical display. Allows the graphical LCD to be used more like a standard alphanumeric display. Compatible with the Graphical LCDs.

Examples

Example program showing how to use the component with a graphical display. FC6 Icon.png GLCD TextField Example

Downloadable macro reference

Clear

Clears all text from the display

Parameters

This macro has no parameters


Return value

This call does not return a value


PrintString

Prints a string of ASCII characters to the display

Parameters

<- STRING Text
Enter the text or variable to print to the display
This parameter may be returned back to the caller


Return value

This call does not return a value


PrintASCII

Prints a single ASCII character to the display

Parameters

BYTE character
Holds an ASCII value


Return value

This call does not return a value


PrintNumber

Prints a number to the display as an ASCII string

Parameters

INT Number
Enter the number or variable to print to the display


Return value

This call does not return a value


ClearLine

Clears a single line of text from the display

Parameters

BYTE Line
Line to clear. Range 0 to CharacterHeight - 1


Return value

This call does not return a value


Cursor

Moves the cursor on the LCD display

Parameters

BYTE x
Sets the cursor position on the x plane, 0 is the left most cell
BYTE y
Sets the cursor position on the Y plane, 0 is the top most line


Return value

This call does not return a value


PrintFormattedNumber

Will allow you to print a number up to 32-bits with signed or unsigned formatting.

Signed = -2147483648 to 2147483647

Unsigned = 0 to 4294967295

Parameters

ULONG Number
Enter the number or variable to print to the display
BOOL Format
0 = Signed, 1 = Unsigned


Return value

This call does not return a value


SetDisplayOrientation

Controls the way data is printed out on the display allowing multiple different viewing orientations. Default is 0.

Parameters

BYTE Orientation
0=Default, 1=90°CW, 2=180°CW, 3=270°CW


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

gLCD Object

This property is of type Panel object and can be referenced with the variable name glcd_obj.

Graphical LCD Object to draw the bitmap image to

Pixel Width

This property is of type Unsigned integer and can be referenced with the variable name PWidth.

Pixel width of selected display

Pixel Height

This property is of type Unsigned integer and can be referenced with the variable name PHeight.

Pixel height of selected display

Character Size

This property is of type Fixed list of ints and can be referenced with the variable name CharSize.

Configures the size of the displayed text and therefore the amount of text that can fit on the display.

Character Width 0/2

This property is of type Unsigned integer and can be referenced with the variable name CWidth.

Number of horizontal characters that can fit onto the display.

Assuming display orientation 0 or 2.

Character Width 1/3

This property is of type Unsigned integer and can be referenced with the variable name CWidth2.

Number of horizontal characters that can fit onto the display.

Assuming display orientation 1 or 3.

Character Height 0/2

This property is of type Unsigned integer and can be referenced with the variable name CHeight.

Number of vertical characters that can fit onto the display.

Assuming display orientation 0 or 2.

Character Height 1/3

This property is of type Unsigned integer and can be referenced with the variable name CHeight2.

Number of vertical characters that can fit onto the display.

Assuming display orientation 1 or 3.

ColourDisplay

This property is of type True or false and can be referenced with the variable name Colour_Display.

Automatically detects if the graphical LCD object is colour or monochrome