lua-users home
lua-l archive

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


  Hi,

  It is simple:

ml = dialog[1][1]

Best,
scuri

> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org]
> On Behalf Of starwing
> Sent: terça-feira, 21 de dezembro de 2010 08:26
> To: lua-l
> Subject: [help] how to reference a control in iuplua's constructor.
> 
> 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()