IupLua - Background of dialog

1

How do I define an image as the background of a Dialog? In the documentation says:

  

BACKGROUND (non inheritable): Dialog background color or image. Can be   a non inheritable alternative to BGCOLOR or can be the name of an   image to be tiled on the background. See also the screenshots of the   sample.c results with normal background, changing the dialog   BACKGROUND, the dialog BGCOLOR and the children BGCOLOR. (since 3.0)

I've tried:

require "iuplua"
dlg = iup.dialog{title="test", size="QUARTERxQUARTER", background="back.png"}
dlg:show()

iup.MainLoop()

~ The image is in the same folder as the program. ~
But nothing happens.
IupLua 3.5.

    
asked by anonymous 08.01.2015 / 21:29

1 answer

1

So it worked:

require "iuplua"
    require "iupluaim"

    back = iup.LoadImage("back.png")
    dlg = iup.dialog{title="test", size="QUARTERxQUARTER", background=back}

    dlg:show()

    iup.MainLoop()
    
10.01.2015 / 01:41