Unit 'MUIClass.Base' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#MUIClass]

TMUIRootClass.CreateObject

Creates the MUI item

Declaration

Source position: MUIClass.Base.pas line 86

public procedure TMUIRootClass.CreateObject; virtual; abstract;

Description

Root class object can not be created

Derived classes must override this function but not call inherited (also when overriding classes which have this function implemented)

A typical CreateObject() implementation looks like this:

procedure TMUIMyNewClass.CreateObject;
var
  TagList: TATagList;  // Taglist for the creation tags
begin
  if not Assigned(FMUIObj) then  // if already created, just skip,
  begin
    BeforeCreateObject;     // you have to implement if your class has childs which are not in childlist and needs to be created
    GetCreateTags(TagList); // implement to add Tags to the creation TagList (already some inside from inherited classes)
    FMUIObj := MUI_NewObjectA(MUIC_XXX, TagList.GetTagPointer); // here also possible NewObjectA() for own subclasses
    AfterCreateObject;      // implement if you need to setup events or other values to set after the object is created
  end;
end;

Documentation generated on: 2024-12-22