I'm trying to save and load an UltraDockManager's layout. My issue is that it needs panes to have a control but I don't create them until a tab is selected. That's to make the form appear more quickly instead of waiting to create all of the tabs' forms.
Is there a way around this?
I have read your post several times and I am still not sure what is your scenario. When are you trying to save and load the layout? What do you have on loading of the form?
I will be waiting for your feedback.
I hope this explanation makes it clearer.
On loading the form, I create DockableControlPanes without a control and all of the other group panes, dock areas, etc. Then in the PaneDisplayed event, I identify the current grid's record and what form to show, create the appropriate form and add it to the control pane. This allows me to show a grid of records from different transport types but show transport-specific forms and create the forms just in time to make it load faster.
I want to load a layout to let the user reset the layout after undocking some tabs, resizing them, etc. I was saving the layout when the form is closed but if there are 5 tabs and the user has clicked on tabs 1 and 2 only, it doesn't show tabs 3-5 after loading the layout. It'd also be a problem if the layout was for sea cargo but the form is currently showing air cargo. I think I'd have to save layouts for all combinatins of tabs and variant forms.
My current idea is to reset the form manually, e.g. resize the form and dock areas, dock any floating panes, clear panes from dock areas then add them back in the right order.
Are you saying that only two of the tabs are being saved with their current layout? I am not sure if I understand the exact issue here. Can you post a small sample which reproduces the undesired behavior? If not, do you want me to create a sample for you based on your specific requirements?
Yes, that's because only tabs 1 and 2 have a control on them, tabs 3 to 5 have no control until the user clicks on them and I create the appropriate form. I'm working in OpenEdge, a database language, so can't provide a sample.
It's okay because I've managed to reset the layout manually. It'd would have been nice to be able to save the tabs' layout (like we do with a grid's layout) but it doesn't seem possible with the way we're using the UltraDockManager.
Thank you for the details. This is not possible because the tabs are not really existing in the layout, since they do not have anything to show, i.e. - an assigned button. This is the way the control works.
Please do not hesitate to contact me if you need any additional assistance.