![]() |
Floating Pane shrink to fit |
Post Reply
|
| Author | |
fawcettp
Newbie
Joined: 18 March 2008 Location: United Kingdom Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: Floating Pane shrink to fitPosted: 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.
|
|
![]() |
|
znakeeye
Senior Member
Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Quote Reply
Posted: 29 March 2008 at 11:37pm |
|
I need this too!!
|
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
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...
|
|
![]() |
|
fawcettp
Newbie
Joined: 18 March 2008 Location: United Kingdom Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
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
![]() |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |