When you do IupSetAttributeId(iup_list, "", index, value), you are setting
the item title. To set a custom data you should do
IupSetAttributeId(iup_list, "MY_DATA", index, data), where MY_DATA can be
any name.

 

  But since this is not an official list attribute, it will be independent
from the item. So, when you remove an item you will have to manually update
the MY_DATAid attributes.

 

  As I mentioned before, IupList does not have an attribute that you can
associate with the item. On the other hand IupTree does have one.

 

Best,

Scuri

 

From: Sławomir Błauciak [mailto:[email protected]] 
Sent: sexta-feira, 16 de novembro de 2012 16:01
To: IUP discussion list.
Subject: Re: [Iup-users] Iup list items don't keep their additional
attributes

 

Hm, that doesn't seem to work either. :/

I created the structure, gave the pointer to the item with
IupSetAttributeId(iup_list, "", index);

but what I receive with IupGetAttributeId(iup_list, "", index); is far
different.

The pointer is totally different, it just stored the null-terminated string
that was on the beginning of the object.

Is there any way to store additional data in list's items?

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to