Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Interfaces: Base and Client.
Tue, Apr 14 2015 3:58 AMPermanent Link

Steve Gill

Avatar

I noticed that some interfaces have a base and client.  This might seem like a stupid question but what's the difference between Base and Client?  If I change the font size on the Base, it doesn't change it on the client so I assume I have to change it on both?

= Steve
Tue, Apr 14 2015 2:24 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

<< I noticed that some interfaces have a base and client.  This might seem
like a stupid question but what's the difference between Base and Client? >>

No, that's actually a very good, fundamental question.

Rule number one is:  for all TControl descendants, the Base element=the
control.  TControl is essentially just a wrapper around the Base TElement
that hides all of the "TElement-y" properties and methods and surfaces them
as "TControl-y" properties and methods.

The base TControl control maps the Client element to the Base element, so
for basic controls the two are the same.  For things like containers, the
Client becomes the actual client area and has a separately-created UI
element to allow for scrolling, headers, etc.  By default, controls that are
parented to a given control are placed into this Client UI element. You can
use these TControl methods (protected) to change how a given control
"attaches" or "is attached" to a given parent control:

        procedure AddControlElement(AControl: TControl); virtual;
        procedure SetParentElement(AParent: TControl); virtual;

This is useful for things like headers and other non-client-area controls
that need to be attached to a container control, but aren't part of the
client area with other "normal" controls.

<< If I change the font size on the Base, it doesn't change it on the client
so I assume I have to change it on both? >>

Yes, as I replied in the other thread, each UI element has its own
distinctive set of properties, and nothing is inherited.  When you have a
lot of inheritance of properties, performance starts to go south quickly
because each UI element has to constantly keep checking its parents for
changes, and each parent has to constantly keep broadcasting its property
changes to its children.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Apr 14 2015 7:53 PMPermanent Link

Steve Gill

Avatar

Thanks Tim, I appreciate you explaining that. Smile
Wed, Apr 15 2015 4:09 AMPermanent Link

Uli Becker

Tim,

thanks for this detailed explanation.

Maybe you could explain "ApplyProperties" as well. We spoke about that in some mails, but I think, it's of general interest.

Thanks Uli
Wed, Apr 15 2015 12:33 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< Maybe you could explain "ApplyProperties" as well. We spoke about that in
some mails, but I think, it's of general interest. >>

All of this will be explained in the manual.  Right now I'm way behind
because I stopped to re-do the standard interfaces, so I've got to
concentrate on getting things done for the final release.

Tim Young
Elevate Software
www.elevatesoft.com


Image