|
Hello all, I have a window identified by "root" and a button identified by "ChangeColor". Suppose I want to change the background color of the window. I can do:
function ChangeColor:action() root.bgcolor = '200 200 200' end
It doesn't work because I only set the attribute 'BGCOLOR'. I need to update the window. I tried:
function ChangeColor:action() root.bgcolor = '200 200 200' iup.Update(root) end
I got an effect, but not the expected one. In the window, I have two tabs. Pressing the ChangeColor button, it doesn't occur anything. But having pressed the button, when I changed to the second tab, the color has changed. The idea is that, pressing the button, the attribute was updated in the window immediately. How to do it?
The second doubt also concerns to window updating. Suppose I have a listbox identified by "countries". Pressing a button, I will update the listbox items with new values gotten from a database. Each element is added by means of "countries:appenditem". Well, I have the listbox updated, but the window doesn't show it. I think this is the same doubt about bgcolor, but I ask: how to do it? Congratulations for the IUP developers. Among all the GUI libraries, IUP is really the simplest one I found.
Luciano |