Page 1 of 1

IUP images on buttons

Posted: 30 Apr 2023 20:24
by jelv
I'm experimenting with putting images from https://www.tecgraf.puc-rio.br/iup/en/iupimglib.html on to a flat button and having issues with the sizing. The documentation says the images are supposed to be 32x32, but they look to be being displayed as 16x16.

For example, in the documentation "IUP_MessageHelp" is shown as
Image

But fbtnTest = iup.flatbutton{image = 'IUP_MessageInfo'} displays as
InfoImage.png
InfoImage.png (768 Bytes) Viewed 439 times
Has anyone used these successfully? They look to be the images used by iup.messagedlg which display as expected.

PS. You need to include require('iupluaimglib') to use them.

Re: IUP images on buttons

Posted: 01 May 2023 08:05
by Mark1834
John,

An interesting addition - it could create some nice attractive plugin menus and forms.

Trial and error worked - add iup.SetGlobal('IMAGESTOCKSIZE', 32) to the top of the script to set the default size. It's not obvious why that is necessary, but IUP can be unpredictable at times!

Re: IUP images on buttons

Posted: 01 May 2023 08:47
by jelv
Thanks Mark.