Designtime editor (RE: [lazarus] Question about component structure)

Pascal Dutilleul pduti at yahoo.com
Mon Aug 9 06:43:25 EDT 1999


--- "Baeseman, Cliff" <Cliff.Baeseman at Greenheck.com> wrote:
> 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 ?



> 
> 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)




> 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






More information about the Lazarus mailing list