|Anonymous | Login | Signup for a new account||2019-02-21 09:53 CET|
|Main | My View | View Issues | Change Log | Roadmap | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0004657||[JEDI VCL] 00 JVCL Components||minor||always||2009-01-10 03:12||2009-01-10 11:11|
|Summary||0004657: TJvTabBar.OnTabClosing breaks "close buttons" mechanism if a modal dialog is invoked|
The mechanism of "close buttons" in TJvTabBar works as follows:
(1) on MOUSEDOWN, if X,Y is inside the close button, the corresponding tab is "marked" for closing;
(2) the OnTabClosing event is fired;
(3) on MOUSEUP, if AllowClose was set true, the tab marked for closing is acctually freed.
If during phase (2) one displays a modal dialog asking the user a confirmation, the MOUSEUP message won't arrive and tab won't be closed.
No solutions for this problem right now.
I thought to manually post a WM_LBUTTONUP event to TabBar window handle just after the modal dialog, but does not work either since at the time OnTabClosing is fired, FClosingTab is still nil.
Maybe the way to go is moving all the logic in the OnMouseUp event
- Lorenzo -
|Tags||No tags attached.|
This is by design. OnTabClosing is not for asking the user if he wants to close the tab. It is for blocking the little [X] in the tab from shrinking.
If you want to implement a Close-Confirmation dialog, you should set AutoFreeClosed to False and ask the user in the OnTabClose event. If the user wants to close the tab, the OnTabClose handler can safely destroy the TTabBarItem.
I will add a new event OnTabCloseQuery for this, but until I have implemented it, you can use the OnTabClose event with AutoFreeClosed=False.
|A new event OnTabCloseQuery is now available that can be used to ask the user to confirm the tab close.|
|2009-01-10 03:12||lomo74||New Issue|
|2009-01-10 03:15||lomo74||Issue Monitored: lomo74|
|2009-01-10 10:35||AHUser||Note Added: 0015235|
|2009-01-10 11:11||AHUser||Note Added: 0015236|
|2009-01-10 11:11||AHUser||Status||new => resolved|
|2009-01-10 11:11||AHUser||Fixed in Version||=> Daily / SVN|
|2009-01-10 11:11||AHUser||Resolution||open => fixed|
|2009-01-10 11:11||AHUser||Assigned To||=> AHUser|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|