Unit 'mui' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#morphunits]

MUIM_SetUData

Find a userdata in objects and childrens list and set an attribute of the object

Declaration

Source position: mui.pas line 711

const MUIM_SetUData = $8042c920;

Description

DoMethod(obj, MUIM_Export, [UData: IPTR; Attr: LongWord; Value: LongWord]);

UData
userdata to look for.
Attr
attribute to set.
Value
value to set attribute to.

This method tests if the MUIA_UserData of the object contains the given UData and sets Attr to Value for itself in this case.

Altough this is not very useful for single objects, performing this method on objects that handle children can become very handy. In this case, all the children (any maybe their children) are tested against UData and all matching objects will get the attribute set.

If you e.g. want to clear several string gadgets in your applciation at once, you simply give them the same MUIA_UserData and use

Note: If you have many objects in your application, MUIM_SetUData may take quite long. You can limit the amount of time by performing the method not on the application but on the window or even on the group your gadgets are place in.

See also

MUIM_GetUData

  

MUIM_FindUData

  

Find a userdata in objects and childrens list and return the object

MUIM_SetUDataOnce

  

This method performs like MUIM_SetUData, but stop at first found object.


Documentation generated on: 2021-07-30