{*******************************************************}
{                                                       }
{       Pascal Script Source File                       }
{       Run by RemObjects Pascal Script in CnWizards    }
{                                                       }
{       Generated by CnPack IDE Wizards                 }
{                                                       }
{*******************************************************}

program PalCompInheritance;

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

var
  CompName: string;
  CompClassName: string;
  CompInheritances: string;
  CompClass: Integer;
begin
  CompName := CnPaletteWrapper.SelectedToolName;

  if CompName = '' then
  begin
    ErrorDlg('No Selected Component in Palette.');
    Exit;
  end;

  CompInheritances := '';
  CompClass := CnGetClassFromClassName(CompName);
  while CompClass <> 0 do
  begin
    CompClassName := CnGetClassNameFromClass(CompClass);
    CompInheritances := CompInheritances + #13#10 + CompClassName;
    CompClass := CnGetClassParentFromClass(CompClass);
  end;

  InfoDlg(CompName + ':' + #13#10#13#10 + CompInheritances);
end.
 
