lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


2010/12/21 starwing <weasley.wx@gmail.com>:
> below code using iup, I write all control in dialog's constructor,
> then, how can I reference the multiline control?
>
> I don't want write multiline control out of table :-(
>
> is it possible to work out it? thx everyone~
>
> require 'iuplua'
>
> local dialog = iup.dialog {
>    iup.vbox {
>        iup.multiline {
>            name = 'text',
>            expand = "YES",
>        };
>
>        iup.hbox {
>            iup.button { title = "Button1";
>
>                action = function(self)
>                    -- XXX: set multiline's text, how can I get
> multiline control here?
>                end;
>            };
>            iup.button { title = "Button2" };
>        }
>    },
>
>    title = "Simple Dialog",
>    size = "QUARTERxQUARTER",
> }
>
> dialog:show()
>
> iup.MainLoop()
>

btw, how to center a control in a vbox/hbox?