Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 1999-08

Designtime editor (RE: Question about component structure)

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Pascal Dutilleul
Cliff" wrote 7 lines
Well I need to draw up what we need here but this is the way it needs to go. 1. I have to implement the anchors concept in the controls that are supposed to have them.

I don't think you should implement this 'into' the component. It is the editor that should handle and draw those anchors. Otherwhise a component could mess -up the editor. (by a custom-component that overwrites some anchor-handling functionality for instance) And what about non-visual components ?

Show quoted text 12 lines
2. I have to implement the align property in controls that are supposed to have them. 3. Only certain types of controls, containers are allowed to contain widgets. This means that I will have to implement some type of logic to determine when and to what controls to apply the fixed widget.

I don't know the component hierarchy, but aren't all containers derived from the same base class. Maybe you could check then the type of the component like 'if component is TBaseContainer then ' (I hope the 'is' is implemented in FPC)

Show quoted text 7 lines
5. a control without a anchor set or an align set should not fire a resize event or have one fired for it. For instance a button does not have a published resize event. It does in the existing implementation but it should not for delphi compatibility reasons.

What about TPanel ? It has an published onResize, and it has anchors.

Pascal

_____________________________________________________________ Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

Reply by email