Sets several attributes of an interface element.


Ihandle *IupSetAttributes(Ihandle *ih, const char *str); [in C]
iup.SetAttributes(ih: ihandle, str: string) -> ih: ihandle [in Lua] 

ih: Identifier of the interface element.
str: string with the attributes in the format "v1=a1, v2=a2,..." where vi is the name of an attribute and ai is its value.

Returns: the same ih.


This function returns the same Ihandle it receives. This way, it is a lot easier to create dialogs in C. See also IupSetCallbacks.

dialog = IupSetAttributes(IupDialog(
       canvas = IupSetAttributes(IupCanvas(NULL), "BORDER=NO, RASTERSIZE=100x100"),
       NULL), "MARGIN=10x10"),

Creates a list with country names and defines Japan as the selected option.

Ihandle *list = IupList (NULL);

See Also

IupGetAttribute, IupSetAttribute, IupGetAttributes, IupSetAtt