We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Dock BarItem to Right of XPToolBar

Is there any way to dock a BarItem to the right of an XPToolBar? I would like to add Close ("X"), Minimize ("_"), and Auto Hide (pin) BarItems to an XPToolBar and have them appear at the far-right. Note that I also want to have a number of BarItems at docked to the normal (far-left) of the XPToolBar. If right-docking is not possible, is there any way to determine the minimum size of an XPToolBar that is required in order for the XPToolBar to contain its BarItems? Knowing this information would allow me to simulate the desired effect by using two XPToolBars. Thank you. Lance

4 Replies

AD Administrator Syncfusion Team August 12, 2003 04:56 PM UTC

Hi Lance, Presently all the bar items are docked to the left on the XPToolBar. There is no provision to either dock it to the right, or to dock some items to the right and left at the same time (like in your case here). There is an open feature request for this feature and it will be implemented shortly. There is a work around to achieve this. You have to use 2 XPToolBars instead of one. Dock the first XPToolBar on top, and then place the second one over the first at its extreme right. Now anchor the second XPToolBar to top,right. The first XPToolBar can contain your items that are supposed to be on the left side, and the second XPToolBar could contain the "X","_" and auto-hide bar items. Let me know if this is the information you are looking for. Regards, Guru Patwal.


LL Lance Levendowski August 12, 2003 11:29 PM UTC

Thank you very much for the reply. I have a couple of follow-up questions. 1. "...this feature and it will be implemented shortly..." Sounds great! Are you able to be more specific? Days, weeks, months... 2. In order to implement your suggested work around I would need to be able to determine the size of the BarItems AS THEY WILL APPEAR ON THE CURRENT SYSTEM. For example, I would need to account for things like the system DPI setting, if an image will be used, if a drop-down arrow is present, etc. Are there any methods that could help me out with this task? Or, better yet, is there any way to tell an XPToolBar to fit its contents? Thanks again! Lance > Hi Lance, > > Presently all the bar items are docked to the left on the XPToolBar. There is no provision to either dock it to the right, or to dock some items to the right and left at the same time (like in your case here). There is an open feature request for this feature and it will be implemented shortly. > There is a work around to achieve this. You have to use 2 XPToolBars instead of one. Dock the first XPToolBar on top, and then place the second one over the first at its extreme right. Now anchor the second XPToolBar to top,right. The first XPToolBar can contain your items that are supposed to be on the left side, and the second XPToolBar could contain the "X","_" and auto-hide bar items. > Let me know if this is the information you are looking for. > > Regards, > Guru Patwal. >


AD Administrator Syncfusion Team August 13, 2003 01:49 PM UTC

Hi Lance, We expect this feature to be implemented in about 3-4 months from now. You could use the PreferredSize property of the XPToolBar control to get the size of the toolbar with its baritems on it. Based on the toolbar size values, you can then position the second toolbar on the first toolbar to get the right docking effect. Let me know if this is the information you are looking for. Regards, Guru Patwal.


LL Lance Levendowski August 13, 2003 09:41 PM UTC

Sounds good. I'll give it a try.

Loader.
Up arrow icon