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

program EditorToolBar;

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

var
  I: Integer;
  Control: TControl;
  Parent: TWinControl;
begin
  Control := CnOtaGetCurrentEditControl;
  if Control = nil then
  begin
    ErrorDlg('NO EditControl Found.');
    Exit;
  end;

  Parent := Control.Parent;
  if Parent = nil then
  begin
    ErrorDlg('NO EditControl Parent Found.');
    Exit;
  end;

  Parent := Parent.Parent;
  if Parent = nil then
  begin
    ErrorDlg('NO EditControl Parent^2 Found.');
    Exit;
  end;

  for I := 0 to Parent.ControlCount - 1 do
  begin
    Writeln(Parent.Controls[I].ClassName);

    if Parent.Controls[I].ClassNameIs('TEditorNavigationToolbar') then
    begin
      (Parent.Controls[I] as TToolbar).AutoSize := False;
      Parent.Controls[I].Height := 0;
      Parent.Controls[I].Visible := False;
    end;
  end;
end.
 
