View Issue Details

IDProjectCategoryView StatusLast Update
0005423JEDI VCL00 JVCL Componentspublic2012-06-13 16:26
ReporterralfiiiAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionsuspended 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0005423: TJvRollOut - SmartShow might fail
DescriptionSmartShow fails (re-integrating a floating form fails) leaving the expanded window open with no components in it visible.
Patch attached.
TagsNo tags attached.

Activities

2010-11-24 18:54

 

RollOut.patch (1,919 bytes)
Index: JvRollOut.pas
===================================================================
--- JvRollOut.pas	(revision 12894)
+++ JvRollOut.pas	(working copy)
@@ -133,10 +133,8 @@
     FCollapsed: Boolean;
     FMouseDown: Boolean;
     FInsideButton: Boolean;
-    FCWidth: Integer;
-    FCHeight: Integer;
-    FAWidth: Integer;
-    FAHeight: Integer;
+    FCWidth, FCHeight: Integer;    // Collapsed height/width
+    FAWidth, FAHeight: Integer;    // Expanded height/width
     FButtonHeight: Integer;
     FChildOffset: Integer;
     FOnExpand: TNotifyEvent;
@@ -1103,7 +1101,7 @@
     end
     else
       R.Left := ImageOptions.Offset * 2 + BevelWidth;
-    R.Top := R.Top - (Canvas.TextHeight(Caption) - (FButtonRect.Bottom - FButtonRect.Top)) div 2 + BevelWidth div 2;
+    R.Top := R.Top - (Canvas.TextHeight(Caption) - (FButtonRect.Bottom - FButtonRect.Top)) div 2;
   end
   else
   begin
@@ -1331,6 +1329,10 @@
     SetChildVisibility;
 end;
 
+// ###################################
+// ######  Methods associated to SmartShow
+// ###################################
+
 // Event handler called by the "TopWindow" when the window-rolloutpanel loses focus
 //   to automatically collapse panel again
 procedure TJvCustomRollOut.OnTopDeactivate(Sender: TObject);
@@ -1352,13 +1354,13 @@
   // -> restore old state
   if Parent = FTopForm then
   begin
+    OldCollapsed := FCollapsed;
+    FCollapsed := False;  // Set control to expanded, so that SetBounds stores expanded dimesions
+
     FTopForm.OnDeactivate := nil; // Deactivate the Event to prevent
                                 // calling this method a second time
     FTopForm.Hide;
 
-    OldCollapsed := FCollapsed;
-    FCollapsed := False;  // Set control to expanded, so that SetBounds stores expanded dimesions
-
     // Set the control back to it's old position!!
     Parent := FOldParent as TWinControl;
     Align := FOldAlign;
RollOut.patch (1,919 bytes)

jfudickar

2010-11-27 11:29

developer   ~0018167

Could you create a small sample showing the problem.

obones

2011-06-07 17:30

administrator   ~0018575

any news?

obones

2012-06-13 16:26

administrator   ~0019962

No news, suspending the issue

Issue History

Date Modified Username Field Change
2010-11-24 18:54 ralfiii New Issue
2010-11-24 18:54 ralfiii File Added: RollOut.patch
2010-11-27 11:29 jfudickar Note Added: 0018167
2010-11-27 11:29 jfudickar Status new => feedback
2011-06-07 17:30 obones Note Added: 0018575
2012-06-13 16:26 obones Note Added: 0019962
2012-06-13 16:26 obones Status feedback => resolved
2012-06-13 16:26 obones Resolution open => suspended
2012-06-13 16:26 obones Assigned To => obones