Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9092991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:58:34+00:00 2026-06-16T22:58:34+00:00

This is the part of code where I get the error: unit Unit1; interface

  • 0

This is the part of code where I get the error:

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cefvcl, Vcl.ExtCtrls, Vcl.StdCtrls, ceflib,
  Vcl.ComCtrls, Vcl.ImgList, Vcl.Imaging.pngimage, Vcl.Buttons, JvSpeedButton, Themes,
  JvExComCtrls, JvComCtrls, JvgPage, Vcl.ToolWin, JvToolBar, Vcl.Menus,
  Vcl.Mask, JvExMask, JvToolEdit, JvExButtons, JvButtons, rkSmartTabs, rkAeroTabs;

type
  TForm1 = class(TForm)
    {....}
    procedure FormCreate(Sender: TObject);
    procedure addnewtab (Sender: TObject);
    procedure closetab (Sender: TObject);

private
  { Private declarations }
public
  { Public declarations }
end;

var
  Form1: TForm1;


implementation

{$R *.dfm}

{....}

procedure TForm1.closetab (Sender: TObject);
var
  smarttabs: TrkAeroTabs;
begin
  smarttabs := Sender as TrkAeroTabs;
  smarttabs.DeleteTab(smarttabs.ActiveTab);
end;

procedure TForm1.addnewtab (Sender: TObject);
var
  smarttabs: TrkAeroTabs;
begin
  smarttabs := Sender as TrkAeroTabs;
  smarttabs.AddTab('New Tab');
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
with TrkAeroTabs.Create(self) do
  begin
    OnCloseTab := closetab;  //***ERROR HERE***
    OnAddClick := addnewtab;
    Parent := Self;
    Align := alClient;
    AddTab('New Tab');
    if ClassType = TrkAeroTabs then
    begin
      ColorBackground := clBlack;
      with Self do
      begin
        GlassFrame.Top     := 25;
        GlassFrame.Enabled := True;
      end;
    end;
    ShowButton   := True;
    AllowTabDrag := True;
  end;
end;

this is the error:

[DCC Error] Unit1.pas(90): E2009 Incompatible types: 'Parameter lists differ'

addnewtab() works fine. I do not understand why closetab() does not work. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:58:35+00:00Added an answer on June 16, 2026 at 10:58 pm

    It doesn’t work because the event is declared with a type different from TNotifyEvent, and your method parameters have to match to what is declared in the type used (number and type of parameters).

    Navigate to the event declaration and you find this:

      TrkAeroTabs = class(TCustomControl)
      ..
      published
      ..
        property OnCloseTab: TOnTabCloseEvent read FOnCloseTab write FOnCloseTab;
    

    Then, navigate to the TOnTabCloseEvent declaration and you find this:

    TOnTabCloseEvent = procedure(Sender: TObject; Index: Integer;
      var Close: Boolean) of object;
    

    So, you have to declare your method like this:

      TForm1 = class(TForm)
        ..
        procedure closetab (Sender: TObject; Index: Integer; var CanClose: Boolean);
    
    
    procedure TForm1.closetab (Sender: TObject; Index: Integer; var CanClose: Boolean);
    var
      smarttabs: TrkAeroTabs;
    begin
      smarttabs := Sender as TrkAeroTabs;
      smarttabs.DeleteTab(smarttabs.ActiveTab);
    end;
    

    And now, you can successfully assign this method to the event.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get the error in this part of the code: void baklanges(list<MataIn> lista); {
I get Type mismatch error in the last line of this part of code:
Part of my code I get the OuterHTML propery <LI onclick=TabClicked(this, 'SearchName', 'TabGroup1');>Name so
my problem is the following: This is a part of my HTML-Code: <form method='GET'
I get a shmget: Invalid argument error while i try to execute this part
I have some logic (java.lang.ArrayIndexOutOfBoundsException) error in this part of my code for some
I have this part of code in my functions.php: function cc_admin_enqueue_scripts($hook) { $file_dir=get_bloginfo('template_directory'); wp_enqueue_script('media-upload');
I am trying to learn and writting this part of code. while testing few
i have this simple question please. I have this part of code which sets
I'm studying data structures (List, Stack, Queue), and this part of code is confusing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.