Hi Martin,

I have created own Tlayouter descendant which have other controls as
childs (TButton and also Tlayouter). I got weird behavior by setting
properties in costructor. Finally found out that I placed my new
component on form before changes in its constructor so they were saved
in mfm and on runtime they mixed with mfm and changes in costructor.
After delete component and drop it again, everything is working fine.
So my request is, could you change current Tlayouter component to
TCustomlayouter, change published properties to public and create new
class Tlayouter = class(TCustomlayouter) with published properties?
Then I can inherit from TCustomlayouter and publish only what I want
because I guess that only published properties are saved into mfm,
right? I think that you just forgot create TCustomlayouter because I
see TCustomButton etc everywhere.

Also have other questions:
1. Why can't override Create constructor? I have this:

  TMCMenu = class(tlayouter)
  private
    FMenuLayout: tlayouter;
  public
    constructor create(aowner: tcomponent); override;

Create in tlayouter is public and virtual. This is a puzzler. I need
to use AfterConstruction virtual method

2. Why setting child component: FMenuLayout.SetSubComponent(True) does
nothing? I still can select this component (and all other childs) at
design time. I'm setting it there:

procedure TMCMenu.afterconstruction;
begin
  inherited afterconstruction;

  FMenuLayout := tlayouter.create(Self);
  FMenuLayout.SetSubComponent(True);
  FMenuLayout.parentwidget := Self;
  ....
end;

Regards

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/
gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to