lights FAQ Forum github.com/luapower/winapi

Native OS APIs
winapi
objc
syscall
xlib
shm

labelclass

text labels


require'winapi.labelclass'

This module implements the Label class for creating text labels.

Label

Hierarchy

Initial fields and properties

NOTE: in the table below i means initial field, r means property which can be read, w means property which can be set.

field/property irw description default reference
align irw 'left', 'center', 'right', 'simple', 'left_nowrap' 'left' SS_LEFT, SS_CENTER, SS_RIGHT, SS_SIMPLE, SS_LEFTNOWORDWRAP
accelerator_prefix irw don't do "&" character translation true SS_NOPREFIX
events irw enable events true SS_NOTIFY
owner_draw irw owner drawn false SS_OWNERDRAW
simulate_edit irw display text like an edit would false SS_EDITCONTROL
ellipsis false, 'char', 'path', 'word' false SS_ENDELLIPSIS, SS_PATHELLIPSIS, SS_WORDELLIPSIS
text irw the text to display 'Text' Get/SetWindowText
w, h irw size 100, 21

Events

event description reference
on_click() clicked STN_CLICKED
on_double_click() double-clicked STN_DBLCLK
on_enable() was enabled STN_ENABLE
on_disable() was disabled STN_DISABLE

Last updated: 22 months ago | Edit on GitHub

Pkg type:Lua+ffi
Version: r3-8-g8ecae71
Last commit:
License: PD
Requires: cairo  glue  luajit  opengl  sg  eq  path2d  pp 
Required by: cairo  cplayer  nw  opengl  sg 

Top