-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DblClick FloatWindow caption shown disabled close button #75
Comments
Have you tried upgrading to the latest version? Version 2.5 is two years old and the upgrade should be seamless. I'm also afraid the description of your issue isn't very clear. |
Close button glimpse when dblclick onto float window caption and if in this time was clicked at close button floating windows hide with their content. I expect that DockContent restore their position into panel. |
Memory leaks prevent to migrate. I use patched version. When dispose visible DockContent from DockPanel. DockPanel holding disposed DockContent and prevent its GC. See my comment: #74 (comment) |
Patch for remove close button glimps for 2.5.1RC1 (this applied also for current version) Index: tags/Release_2.5_RC1/WinFormsUI/Docking/FloatWindow.cs
===================================================================
--- tags/Release_2.5_RC1/WinFormsUI/Docking/FloatWindow.cs (revision 115)
+++ tags/Release_2.5_RC1/WinFormsUI/Docking/FloatWindow.cs (working copy)
@@ -131,18 +131,17 @@
content.OnDeactivate(e);
}
- protected override void OnLayout(LayoutEventArgs levent)
- {
- VisibleNestedPanes.Refresh();
- RefreshChanges();
- Visible = (VisibleNestedPanes.Count > 0);
- SetText();
+ protected override void OnLayout(LayoutEventArgs levent)
+ {
+ VisibleNestedPanes.Refresh();
+ RefreshChanges();
+ SetText();
- base.OnLayout(levent);
- }
+ base.OnLayout(levent);
+ }
- [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.Windows.Forms.Control.set_Text(System.String)")]
+ [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.Windows.Forms.Control.set_Text(System.String)")]
internal void SetText()
{
DockPane theOnlyPane = (VisibleNestedPanes.Count == 1) ? VisibleNestedPanes[0] : null;
@@ -173,7 +172,7 @@
{
if (m.Msg == (int)Win32.Msgs.WM_NCLBUTTONDOWN)
{
- if (IsDisposed)
+ if (Disposing || IsDisposed)
return;
uint result = NativeMethods.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
@@ -268,14 +267,12 @@
internal void RefreshChanges()
{
- if (IsDisposed)
- return;
+ if (Disposing || IsDisposed)
+ {
+ return;
+ }
- if (VisibleNestedPanes.Count == 0)
- {
- ControlBox = true;
- return;
- }
+ Visible = (VisibleNestedPanes.Count > 0);
for (int i=VisibleNestedPanes.Count - 1; i>=0; i--)
{
@@ -295,7 +292,7 @@
}
//Only if there is a ControlBox do we turn it off
//old code caused a flash of the window.
- if (ControlBox)
+ if (ControlBox)
ControlBox = false;
}
|
The issue here still is not clear and a change to manipulate the Visibility of the FloatWindow doesn't really make sense here. Closing this issue, please repost if you continue to experience trouble with the current release. |
2.5.1RC1.
DockContent (CloseButton = false, CloseButtonVisible = false)
When I dblclick FloatWindow caption, floating form show and hide disabled close button. In some case click on this button close form.
The text was updated successfully, but these errors were encountered: