Create Controls on Initialise

Started by ScottBolton, Today at 08:26:12 AM

Previous topic - Next topic

ScottBolton

Hi, chaps.
I know how to modify existing control properties via lisp, but is it possible to create NEW controls and assign events to them? Something like:

(setq Y 20)
(foreach control '("CheckBox1" "CheckBox2" "CheckBox3")
(dcl-Control-Create control (list 50 Y)) ; < create this control at a specified coordinate
(dcl-Control-SetOnClick control (runthisroutine)) ; assign an event
(setq Y (- Y 20)) ; change the Y coordinate of the next control
)