Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 629
  • Last Modified:

Double click on tab of a page control

I have a page control and several tab sheets, I want to write an event when users double click on the tab, say to close a open sheet, how do I detect the double click event as both of the page control and tabsheet control do not have a double click event?
0
foxvision
Asked:
foxvision
1 Solution
 
calinutzCommented:
Why not use the onChange event if this is what you want to catch.
0
 
foxvisionAuthor Commented:
I can't use the OnChange event as I do not know if user uses a double click. I want to use double click to remove an existing tab.
0
 
foxvisionAuthor Commented:
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
krypto2000Commented:
you have to create a new component the is derived from TPageControl and add the onDblClick event that is the only way...
0
 
foxvisionAuthor Commented:
Please delete this question. I answer my own question. Thank you.

uses
  Classes, Controls, ComCtrls;

type
  TxxPageControl = class(TPageControl)
  public
    constructor Create(AOwner: TComponent); override;
  published
    property OnDblClick;
  end;

implementation

constructor TxxPageControl.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  ControlStyle := ControlStyle + [csClickEvents];
end;
0
 
krypto2000Commented:
However, you can give the point for people that who took some time to help you...
0
 
moduloCommented:
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now