SOLVED: Hopefully easy MDI question.
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=12132
Printed Date: 31 January 2025 at 3:49am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: SOLVED: Hopefully easy MDI question.
Posted By: JasonG
Subject: SOLVED: Hopefully easy MDI question.
Date Posted: 10 September 2008 at 2:41pm
Ok, so I have what HAS to be a simple question...
I have an MDI form with a docking control and a commandbar control. The 2 docking panes are being link to 2 borderless forms. pretty basic.
The commandBar simply has a FILE menu, code taken from one of the demo projects.
When I resize the splitter to increase/decrease the width of the pane(s), Everything in the panes resizes properly, however, the client area of the MDI form does not resize. when you increase the pane width, the splitter is visibly hidden underneath the MDI client area. When the width is decreased, there is a gap between the docking panes and the MDI client area.
Very Odd.
I've attached the code in a ZIP file, but it would be pretty easy to just copy the code, its VERY little.
http://www.jasongoldberg.com/files/MightyApp_Prototype.zip - http://www.jasongoldberg.com/files/MightyApp_Prototype.zip
CODE:
Option Explicit
Dim itemPane As Pane Dim propertyPane As Pane
Dim MenuBar As MenuBar
Private Sub MDIForm_Load() Call InitializeDockingPanes Call InitializeCommandBar End Sub
Sub InitializeCommandBar() CommandBarsGlobalSettings.App = App Dim Control As CommandBarControl Dim ControlFile As CommandBarPopup, ControlEdit As CommandBarPopup, ControlView As CommandBarPopup Dim ControlHelp As CommandBarPopup Dim custControl As CommandBarControlCustom Set ControlFile = CommandMain.ActiveMenuBar.Controls.Add(xtpControlPopup, 0, "&File") With ControlFile.CommandBar.Controls .Add xtpControlButton, ID_FILE_NEW, "&New" .Add xtpControlButton, ID_FILE_OPEN, "&Open" .Add xtpControlButton, ID_FILE_CLOSE, "&Close" .Add xtpControlButton, ID_FILE_SAVE, "&Save" Set Control = .Add(xtpControlButton, ID_FILE_PRINT, "&Print") Control.BeginGroup = True .Add xtpControlButton, ID_FILE_PRINT_SETUP, "Print Set&up..." Set Control = .Add(xtpControlButton, ID_FILE_EXIT, "&Exit") Control.BeginGroup = True End With
CommandMain.AddImageList imlToolbarIcons End Sub
Sub InitializeDockingPanes()
Set itemPane = dockMain.CreatePane(1, 200, 120, DockLeftOf) itemPane.Title = "Objects" itemPane.Options = PaneNoCloseable + PaneNoHideable
Set propertyPane = dockMain.CreatePane(2, 200, 120, DockBottomOf, itemPane) propertyPane.Title = "Properties" propertyPane.Options = PaneNoCloseable + PaneNoHideable
dockMain.PaintManager.SplitterStyle = PaneSplitterGripperOfficeXP dockMain.PaintManager.SplitterColor = &HE0E0E0 dockMain.Options.LunaColors = False dockMain.VisualTheme = ThemeOffice2003 dockMain.TabPaintManager.OneNoteColors = True dockMain.PanelPaintManager.OneNoteColors = True dockMain.TabPaintManager.ClientFrame = xtpTabFrameNone dockMain.EnableKeyboardNavigate PaneKeyboardUseAll
dockMain.RecalcLayout End Sub
Private Sub dockMain_AttachPane(ByVal Item As XtremeDockingPane.IPane) On Error Resume Next Select Case Item.Id Case 1 'Items Item.Handle = frmItemTree.hWnd Case 2 'Properties Item.Handle = frmProperties.hWnd End Select End Sub
Private Sub MDIForm_Unload(Cancel As Integer) End End Sub
------------- Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
|
Replies:
Posted By: younicke
Date Posted: 10 September 2008 at 7:19pm
Hi!
In your Initialize Docking Pane add the red line:
Sub InitializeDockingPanes()
...
dockMain.SetCommandBars Me.CommandMain dockMain.PaintManager.SplitterStyle = PaneSplitterGripperOfficeXP ...
End Sub
|
Posted By: JasonG
Date Posted: 11 September 2008 at 8:35am
I saw this suggestion in another post, and I tried it without luck. However, for some weird reason, adding the "me." to the call seems to have done it.
Thanks so much!!
------------- Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
|
|