Solved

Double click on tab of a page control

Posted on 2004-10-20
9
525 Views
Last Modified: 2010-04-05
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
Comment
Question by:foxvision
9 Comments
 
LVL 11

Expert Comment

by:calinutz
ID: 12367423
Why not use the onChange event if this is what you want to catch.
0
 

Author Comment

by:foxvision
ID: 12367885
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
 

Author Comment

by:foxvision
ID: 12368022
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Expert Comment

by:krypto2000
ID: 12379582
you have to create a new component the is derived from TPageControl and add the onDblClick event that is the only way...
0
 

Author Comment

by:foxvision
ID: 12396177
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
 

Expert Comment

by:krypto2000
ID: 12397857
However, you can give the point for people that who took some time to help you...
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 13458130
PAQed with points refunded (125)

modulo
Community Support Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now