Download Now
Forums

    Reference Codebot.Frame.Converter.pas

    Part of the Codebot Frame Design package

    The Codebot.Frame.Converter unit turns a form or frame of the designer into the source of a control. TFrameConverter starts with a copy of the unit of your form and changes it:

    • The unit is renamed, and your form class becomes a TCustomControl descendant with the new class name.
    • The fields of your components move to a private section, and the global variable of your form is removed.
    • A constructor calls CreateLayout, which creates each component, places it in its parent, and sets the properties from the form file. References to other components and the items of collections are set once every component exists.
    • The properties of your form that a control also has are set on the control, and the client size of your form becomes the size of the control.
    • OnCreate and OnDestroy handlers of your form are called from the constructor and destructor.
    • Properties that cannot be written as code are stored as resources and loaded by the control.
    • A Register procedure adds the control to the palette page you chose.

    Anything that could not be converted is collected as messages, along with code that uses members a form has and a control does not, such as Close or ShowModal, or the global variable of the form. Components inherited from an ancestor and changes made inside an embedded frame are skipped, and forms that inherit from another form cannot be converted.

    Items 16 items

    NameKindLine
    TConvertMessagerecord32
    FileNamefield37
    IsWarningfield34
    Linefield38
    Textfield35
    TConvertMessagesarray41
    TFrameConverterclass46
    Createconstructor86
    Destroydestructor88
    Executefunction91
    ComponentUnitsproperty100
    Errorproperty103
    Messagesproperty97
    Resourcesproperty95
    UnitSourceproperty93
    UsedUnitsproperty102