VCLua v0.3.2

Copyright (C) 2006,2010 Hi-Project Ltd.

Reference Usage Tutorials Downloads Screenshots


Using VCLua controls

Creating controls

control = VCL.ControlName(parent,name)

form = VCL.Form()

Creates a new, randomly named form, which is descendant of the mainform. If mainform not exists, this form will be the mainform.

button = VCL.Button(form)

The abowe example shows, how to create a button as child control on a form as parent.

Adjusting properties

control.propertyname = value

form.width = 100

to set more properties concurrently:

control._ = {width=100, height=100, caption="Test form"}

Handling events

The control event is the name of the lua function (not the function!) which handles the event

 form.onclick = "onFormClick"

function onFormClick(sender)

print(, sender.width)


Calling methods

Control methods can be called similar to lua function calls: control:method(params...)


Destroying controls

Destroying controls is important to avoid further problems


This will destroy the form, and all child components of the form.



Downloads available from VCLua project page at



Some managed visible controls which are availabe now

VCLua Controls

VCLua (with gtk widgetset) on Ubuntu 9.04

Simple multifile editor application written in LUA using VCLua library

VCLed editor