Iuplua - Background dialog

Asked

Viewed 87 times

1

How do I define an image as the background of a Dialog? In the documentation it 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 to:

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

iup.MainLoop()

~The image is in the same program folder.~
But nothing happens at all.
Iuplua 3.5.

  • I suggest you look at the documentation on how to associate an image to a IUP attribute. The file name only works in very particular cases.

  • I haven’t found anything yet.

1 answer

1

That’s how it worked:

require "iuplua"
    require "iupluaim"

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

    dlg:show()

    iup.MainLoop()

Browser other questions tagged

You are not signed in. Login or sign up in order to post.