Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - SOLVED: Hopefully easy MDI question.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SOLVED: Hopefully easy MDI question.

 Post Reply Post Reply
Author
Message
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Topic: SOLVED: Hopefully easy MDI question.
    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
Back to Top
younicke View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 March 2005
Status: Offline
Points: 107
Post Options Post Options   Thanks (0) Thanks(0)   Quote younicke Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post 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
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.141 seconds.