I hope this is something simple, but I am not seeing the issuing here. In my main form I am setting up my nav bars using DockingPanes. The panes have a TaskPanel in them. I don't wan't to save the items in the TaskPanel, because they may change in the future. So I do the SaveState on the docking panel in the unload of the main form. I do the LoadState in the load of the main form after creating my DockingPane. I made sure that I am using the same names exactly for the LoadState/SaveState. Things look fine, and the DockingPanes come back fine, however the TaskPanel is not shown. I notice that I don't get the resize event, like I do when I run the app for the first time (no saved data). It is like the forms are not attached to the DockingPane. What am I doing wrong?
Code below...
'===================================
'Main form
'===================================
Private Sub MDIForm_Load() 'dp is DockingPane
Dim thePane As Pane Set thePane = dp.CreatePane(1, 200, 1, DockLeftOf) thePane.title = "test" thePane.Handle = frmTest.hwnd
dp.LoadState "MyTest", App.title, "DockingPanes"
End Sub
Private Sub MDIForm_Unload(Cancel As Integer) On Error GoTo test 'Docking Pane info... dp.SaveState "MyTest", App.title, "DockingPanes"
End Sub
'============================
'Test form
'============================
Private Sub frmTest_Load() With wndTaskPanel '.Icons = im.Icons .SetMargins 0, 2, 0, 2, 2 .SetGroupIconSize 16, 16 '.SetGroupIconSize 32, 32 .SetIconSize 32, 32 .EnableAnimation = True .Behaviour = xtpTaskPanelBehaviourToolbox End With
Dim navBarGroup As TaskPanelGroup Dim navBarGroupItem As TaskPanelGroupItem With wndTaskPanel Set navBarGroup = .Groups.Add(0, "2138") With navBarGroup '.SetIconSize 32, 32 .IconIndex = ID_MAIN_NEW .ToolTip = "This is the Order Group - layout default" .ItemLayout = xtpTaskItemLayoutDefault Set navBarGroupItem = .Items.Add(ID_MAIN_NEW, "2001", xtpTaskItemTypeLink, ID_MAIN_NEW) With navBarGroupItem .ToolTip = "2500" End With Set navBarGroupItem = .Items.Add(ID_MAIN_OPEN, "2002", xtpTaskItemTypeLink, ID_MAIN_OPEN) With navBarGroupItem .ToolTip = "2501" End With Set navBarGroupItem = .Items.Add(ID_MAIN_DELETE, "2013", xtpTaskItemTypeLink, ID_MAIN_DELETE) With navBarGroupItem .ToolTip = "2507" End With Set navBarGroupItem = .Items.Add(ID_MAIN_PREVIEW, "2005", xtpTaskItemTypeLink, ID_MAIN_PREVIEW) With navBarGroupItem .ToolTip = "2510" End With End With
'Abbreviated the task panel groups and items to make it clearer as to what is occurring. End Sub
Private Sub frmTest_Resize() wndTaskPanel.Left = 0 wndTaskPanel.Top = 0 wndTaskPanel.Width = Me.ScaleWidth wndTaskPanel.Height = Me.ScaleHeight End Sub
I would send pictures to show what is happening, however I don't have enough permissions to do that.
I am using version 11.2 of the ActiveX controls.
|