How to set which row to dock bar to?
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=8811
Printed Date: 18 June 2025 at 2:00am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: How to set which row to dock bar to?
Posted By: d_r_smith
Subject: How to set which row to dock bar to?
Date Posted: 16 November 2007 at 6:34pm
Hi, Is it possible for me to programmatically control where a bar docks to? I'm not talking about anything that can be done at design time -- I need to do this through code, and I won't know till run time where I need to dock to.
I've found that this code can set whether the CommandBar is docked or floating, and if it's floating, this line controls the floating position:
frmMain.Instance.CommandBars.DockToolBar( frmMain.Instance.CommandBars[2], 10, 20, XTPBarPosition.xtpBarFloating);
So that's good, that's control that I will need sometimes. But at other times I want to programmatically dock the bar.
If I use xtpBarTop instead of xtpBarFloating, then that docks the bar all right... but it's on the very top row, which is not what I want. I don't see any way of specifying that I want to dock to, say, the 2nd or 3rd row.
Is there another method I should call to specify which row the bar should dock to? Can you post a code example? The CHM file reference document really doesn't adequately explain the x and y parameters of the DockToolBar method -- are those parameters just ignored when I specify xtpBarTop ? They don't seem to have any effect on the bar's Y position when the bar is docked.
Thanks for any info....
|
Replies:
Posted By: Oleg
Date Posted: 17 November 2007 at 12:59am
Just set right coordinates.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: d_r_smith
Date Posted: 19 November 2007 at 11:39am
I don't understand what you mean. Can you tell me which method or property to use?
And are you saying I need to specify coordinates in pixels? Other products that I've also evaluated, have similar functionality, but they allow me to specify an index -- e.g. I could specify 2 to put the bar on row number two. So I wasn't expecting to have to calculate pixel coordinates.
|
|