mui.Set -- set value of a MUI object attribute
mui.Set(id$, attr1$, val1$, ...)
This function can be used to set the current value of one or more attributes in the MUI object specified in id$. You have to pass the attribute name and desired new value for every attribute you want to modify. You can repeat these attribute/value pairs as often as you like to modify multiple attributes with just a single call to mui.Set(). Attribute names and object IDs are case insensitive, i.e. it does not matter if you use upper or lower case characters for them.

The attributes that you can use with this function depend on the class of the specified MUI object. Have a look at the class reference to see what attributes are supported by the different MUI classes. In order to use an attribute with this function, it needs to have an applicability of "S". Attributes of Area class and Notify class can be used on almost all other classes because the Area and Notify classes act as superclasses for most of the other classes.

If you have setup a notification on the attribute that you want to modify using this function, the notification will be triggered once you call mui.Set() on that attribute. If you do not want this behaviour, you can use the Notify.NoNotify attribute to prevent a notification from being issued.

identifier of MUI object to modify
attribute whose value should be modified
new value for the attribute
you can repeat attribute/value pairs as often as you like
mui.Set("my_listview", "active", 15)
The code above sets entry number 15 as currently active entry in the listview that has the identifier "my_listview" by setting the Listview.Active attribute.

mui.Set("my_listview", "nonotify", True, "active", 15)
This code does the same as the code above but prevents notifications from being issued by setting the Notify.NoNotify attribute to True. This is useful if you need to distinguish between user selections in the listview and selections made programmatically using mui.Set().

Show TOC