Wheel IDE

Online demo »

Label

Label example

This example shows how to use the label component.

Code

#project "Label example"

#include "lib/modules/standard.whl"
#include "lib/modules/components/component.whl"
#include "lib/modules/components/form.whl"
#include "lib/modules/components/label.whl"

#define LABEL_COUNT 0x5EF685C3
#define LABEL_LABEL 0x3B44B2E3

#resource "label.wfrm"

number count = 0
number windowHandle

; @proc                   Show the form.
; @ret                    The handle to the form.
proc showLabelForm()
    ret components.form.show("label.wfrm")
end

proc main()
    windowHandle = showLabelForm()
    repeat
        count++
        components.label.setNumber(windowHandle, LABEL_COUNT, count)
        sleep(500)
    end
end

Screenshot