Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Problem Displaying correct toolbar when merging.
posted

OK here's the situation:

I'm using the merge feature.  I open a MDI child form where the child form has 4 toolbars.  Initially I want to show only one toolbar that's associated to several tabs on the form.   This all works as I would expect.

In the selected tab change event I hide and unhide the toolbars as needed.  The problem happens when I close the form when the non-default toolbar is displayed.  When the form is re-opened with the same or different data the non-default toolbar shows up on the main tab even though I preset the form on initialization to set the visible property of that toolbar to false and the visible property of the default toolbar to true.

And it ignores changing the toolbars based on selected tab change until I select the tab that makes that non-default toolbar visible.  After that the toolbars show and hide correctly.

I've tried RefreshMerge on both the parent and the child toolbarmanager with no luck.  Is there something I'm missing?

Parents
No Data
Reply
  • 44743
    posted

    It is possibly a bug. I just looked through the UltraToolbarsManager code and it appears the UltraToolbar.Visible property is synchronized from the child toolbar to the merged parent toolbar while the child is merged. But it seems that when a child is re-merged, we are not forcing a synchronization. You might be able to work around this by toggling the visibility of all child toolbars immediately after the merge occurs: override OnMdiChildActivate on the parent Form, call the base implementation first, and then call some method on the current child Form to toggle the Visible property on all its toolbars. What I mean by that is just change the Visible property to the opposite of the current value and then do the same thing again, so it ends up getting the same value with which it started.

    In the meantime, I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue.

Children