From1 := TFrom1.Create(Nil);
From1.ManualDock(cxPageControl1, nil, alNone);
From1.Show;
cxPageControl1.ActivePageIndex := cxPageControl1.PageCount - 1;
cxPageControl1.Properties.CloseButtonMode := cbmActiveTab;
OnCanCloseEx events at the click of ActiveTab CloseButton not going through
How can I use the OnCanCloseEx events ?
TcxPageControl - Clicking tab buttons on a page created using a drag-and-dock operation has no effect
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
Hello,
As you can see in the "TcxCustomTabControl.OnCanCloseEx" help topic, this event enables you to respond to closing a tab.
So, you can prevent closing some tabs. I've created a simple example for you where you can close only the first tab. Please take a look at the attachment.
Would you please modify the sample from my previous post, provide us with step-by-step instructions on how to reproduce the problem, and describe your current and expected results?
In your modified sample, you cannot close the Form Tab. AmI right? For other tabs, the OnCanCloseEx event is fired.
If so, would you please describe your scenario in great detail?
Other Answers
Only had to change the properties
cxPageControl.DockSite: = True;
Form1.DragKind: = dkDock
Ok. We will examine this behavior, but it can take some time. Your patience is appreciated.