Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Question about Interfaces
Tue, Jul 14 2015 7:03 PMPermanent Link

Walter Matte

Tactical Business Corporation


I know I can alter the interface file for a control and put in in a folder and then include that folder in the search path so it gets chosen before the searching the program file installed version of the interface.

Example a Grid - can I have two Grids on a Form each getting interface information from a different interface file?

What about a grid on one form and a grid on a different form?

Walter
Wed, Jul 15 2015 6:37 AMPermanent Link

Uli Becker

Walter,

it's certainly not possible to use different interfaces for the same control. But how about creating a new component based om TGrid?

Uli
Wed, Jul 15 2015 3:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Walter,

<< Example a Grid - can I have two Grids on a Form each getting interface
information from a different interface file? >>

No, but as Uli states, you can certainly do a "quickie" workaround:

TMyGrid = class(TGrid)
   protected
       function GetInterfaceClassName: String; override;
   end;

TMyOtherGrid = class(TGrid)
   protected
       function GetInterfaceClassName: String; override;
   end;

TMyOtherOtherGrid = class(TGrid)
   protected
       function GetInterfaceClassName: String; override;
   end;

..........

function TMyGrid.GetInterfaceClassName: String;
begin
  Result:=TMyGrid.ClassName;
end;

function TMyOtherGrid.GetInterfaceClassName: String;
begin
  Result:=TMyOtherGrid.ClassName;
end;

function TMyOtherOtherGrid.GetInterfaceClassName: String;
begin
  Result:=TMyOtherOtherGrid.ClassName;
end;

And, remember to add them to the component library as new components.

Of course, after a certain point, you may want to just ask me if the TGrid
can have a new customization property. Smile

Tim Young
Elevate Software
www.elevatesoft.com
Image