Print Page | Close Window

Pane does not initially size correctly

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=7894
Printed Date: 12 December 2024 at 1:45pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Pane does not initially size correctly
Posted By: ijwelch
Subject: Pane does not initially size correctly
Date Posted: 29 August 2007 at 2:14am
If I'm doing something stupid then please let me know...

I've got a 'find' dialog as a floating pane. The problem is that the very first time it's displayed it does not size correctly. Here's what it should look like:




but the first time it's shown it looks like this:


If the user attempts a resize it snaps to the correct size and always shows correctly thereafter.

Here's my code for displaying the pane:


        Dim p As XtremeDockingPane.Pane
        Dim l As Long
        Dim t As Long

1000    If b Then
1010        Set p = dp.FindPane(DP_FIND)

1020        If p Is Nothing Then
1030            l = Me.Left / Screen.TwipsPerPixelX
1040            t = Me.Top / Screen.TwipsPerPixelY
1050            l = l + 32
1060            t = t + 100
1070            Set p = dp.CreatePane(DP_FIND, 399, 123, DockBottomOf, 1)
1080            p.Title = "Find..."
1090            p.Handle = ucFind.hwnd
1100            dp.FloatPane p, l, t, 399, 123
1110            p.Options = PaneNoDockable Or PaneNoHideable
1120            p.MinTrackSize.SetSize 399, 123
1130            p.MaxTrackSize.SetSize 399, 123

            Else
1140            p.Handle = ucFind.hwnd
1150            p.Closed = False
            End If
        End If

It's a bit hard to debug as one manual resize and everythings' ok again..

BTW this is using the latest version 11.1.

Thanks in advance for any help.





Replies:
Posted By: ijwelch
Date Posted: 29 August 2007 at 2:15am
Sorry, posted in wrong section. This should be in activeX section. Can moderator please move?


Posted By: Oleg
Date Posted: 03 September 2007 at 7:05am
Hi,
 
Replace 
dp.FloatPane p, l, t, 399, 123
to
dp.FloatPane p, l, t, l + 399, t + 123


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net