SOLVED: Hopefully easy MDI question. |
Post Reply |
Author | |
JasonG
Groupie Joined: 07 July 2008 Status: Offline Points: 76 |
Post Options
Thanks(0)
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 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 |
|
younicke
Senior Member Joined: 11 March 2005 Status: Offline Points: 107 |
Post Options
Thanks(0)
|
Hi!
In your Initialize Docking Pane add the red line: Sub InitializeDockingPanes() ... dockMain.SetCommandBars Me.CommandMain dockMain.PaintManager.SplitterStyle = PaneSplitterGripperOfficeXP ... End Sub |
|
JasonG
Groupie Joined: 07 July 2008 Status: Offline Points: 76 |
Post Options
Thanks(0)
|
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 |
|
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 |