Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - Floating Pane shrink to fit
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Floating Pane shrink to fit

 Post Reply Post Reply
Author
Message
fawcettp View Drop Down
Newbie
Newbie


Joined: 18 March 2008
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote fawcettp Quote  Post ReplyReply Direct Link To This Post Topic: Floating Pane shrink to fit
    Posted: 18 March 2008 at 10:34am
Is it possible to get a pane to shrink to it's child form (the form to which it is attached via the Handle attribute) when it is detached from a DockingPaneManager?
 
I've tried to set the Min and Max track values in the action event for the Docking pane manager when the pane is floated but this has no effect.
 
I'm trying to get the panes to resize to minimise the amount of screen space they take up when detached so any assistance would be appreciated. I would have thought this behaviour would be configurable but haven't been able to find anything so far.
 
Thanks.
 
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 29 March 2008 at 11:37pm
I need this too!!
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 31 March 2008 at 6:21am
Hi, 
 
The properties MinTrackSize and MaxTrackSize should do the trick
 
DockingPane.FindPane(1).MinTrackSize.SetSize 100, 100
DockingPane.FindPane(1).MaxTrackSize.SetSize 100, 100
(This will also prevent the pane from getting resized as well)
 
When MinTrackSize and MaxTrackSize are set to a value the floating pane will be resized to this value otherwise you have to set left,top,right,bottom in the FloatPane method.
 
DockingPane.FloatPane DockingPane.FindPane(1), 0, 0, 0, 0
(Where 1 is the Pane ID)
 
Or in the DP Action event:
 
If Action = PaneActionFloated Then
        DockingPane.Options.ThemedFloatingPanes = False 'huhhhh ????? 
        Pane.MinTrackSize.SetSize 200, 100
        Pane.MaxTrackSize.SetSize 200, 100
        DockingPane.Options.ThemedFloatingPanes = True 'huhhhh ????? 
        DockingPane.RedrawPanes 'resize contents
End If
 
If Action = PaneActionDocked Then
        Pane.MinTrackSize.SetSize 300, 300
        Pane.MaxTrackSize.SetSize 800, 300
End If 
 
Note: the 'huhhhh ????? means that this must be set first otherwise the pane won't be resized to Min and MaxTrackSize. If you don't use ThemedFloatingPanes you don't have to add these lines of code. There are a few buts...
 
Back to Top
fawcettp View Drop Down
Newbie
Newbie


Joined: 18 March 2008
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote fawcettp Quote  Post ReplyReply Direct Link To This Post Posted: 01 April 2008 at 11:36am
I've tracked the problem down to one of the options on the DockingPaneManager. I had ThemedFloatingFrames = true which causes the observed behaviour i.e panel size doesn't change when the pane is undocked.
Setting ThemedFloatingFrames = false does cause the panel to shrink to the size of the wrapped window. However, in this case, the window style doesn't match the other windows. I've managed to find a workaround but I'm surprised this option gives functional differences rather than just a difference in appearance.
 
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 01 April 2008 at 12:47pm
Hi,
 
That's what I said, look at the 'huhhhh ????? note. You don't have to workaround that, CodeJock will fix this in the final V12 release. So be patience my son
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.184 seconds.