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
560
Changing Control Container Orientation
posted

This is a very low priority item, but I was just wondering if anyone else has had success in this area and could share your knowledge with me. 

I have a toolbar that has a ControlContainer object.  In the ControlContainer, I have a Microsoft TrackBar control.  This works and looks great in the horizontal position, but the control disappears when I move the toolbar and dock it vertically, on the side of my form.  I would have thought that the ControlContainer would change orientation, and it may be, but I don't know for certain.  I say it may be because I wonder if my trackBar is not changing orientation properly.  

To change the trackBar orientation property, I am listening to the ToolbarModified event and am checking the ToolOrientation property of the changed toolbar, like this:

if (e.Toolbar.Settings.ToolOrientation == Infragistics.Win.UltraWinToolbars.ToolOrientation.Verical)

{

 trackBar1.Orientation = Orientation.Vertical;

}

else

{

 trackBar1.Orientation = Orientation.Horizontal;

}

Still, this is not working.  Any ideas as to why this wouldn't work? 

Parents
  • 44743
    Verified Answer
    posted

    The ControlContainerTool does not display the control on vertically oriented toolbars. There are two options here. You can create a derived ControlContainerTool which can display on vertical toolbars (but I don't recommend this approach). The other thing to do would be to have a hidden PopupControlContainerTool placed right next to the ControlContainerTool which has the same Control set on it. When the toolbar is changed so it has a vertical orientation, hide the control container and show the popup control container. When the toolbar is docked horizontally again, hide the popup control container and show the control container. This way, the user can always get to the track bar if they need to, even if they need to drop down a menu to access it.

Reply Children
No Data