-
Notifications
You must be signed in to change notification settings - Fork 88
glgui label
glgui-label create a Label widget from a string
Parameter | Description |
---|---|
g | The Graphical User Interface (GUI) belonging to this widget |
x | The lower left corner along the x-axis in pixels |
y | The lower left corner along the y-axis in pixels |
w | The width of the element in pixels |
h | The height of the element in pixels |
label | The string for label |
fnt | The font used to render the label string |
color | The widget color |
bgcolor | Optional: The widget background color |
Besides the parameters set in the procedure, the widget has the following attributes that can be set using glgui-widget-set!:
Attribute | Default Value | Description |
---|---|---|
rounded | False | If true, the background rectangle has rounded corners. |
aftercharcb | False | If set to a procedure and focus is true, then the procedure is called after each character is typed or deleted. |
onfocuscb | False | If set to a procedure and focus is false, then the procedure is called upon first click on the label. |
| hidden | False | If true, the widget is not displayed. | | direction | GUI_LEFTTORIGHT | If set to GUI_RIGHTTOLEFT then text is wrapped with the right end of the string on the top line and the left end on the bottom line. | | password | False | If true, each character in the label is rendered as an *. | enableinput | False | If true, clicking on the label will set focus to true. | focus | False | If true, key events such as EVENT_KEYRELEASE and EVENT_KEYBACKSPACE change the contents of the label. | | clearoninput | False | If true and focus is true, the next character entered while will replace the entire contents of the label and clearoninput will be set to false. | | showstart | False | This controls which end of a label's text is visible if the content is too long for the dimensions. If true and align is GUI_ALIGNCENTER the label will show the start of the text instead of the end. If true, align is GUI_ALIGNLEFT, and focus is true, the label will show the start of the text instead of the end. | | align | GUI_ALIGNLEFT | This controls the alignment of the text within the horizontal dimensions of the label. If set to GUI_ALIGNCENTER, the text is centered and if set to GUI_ALIGNRIGHT the text is aligned to the right. |
Example1: Create a cyan colored label that says "100". The widget should have the following specification x=10, x=25, w=40, h=60. It requires a numerics font libary in size 64 to work.
(glgui-label mygui 10 25 40 60 "100" num64.fnt Cyan)
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip