Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - How to set which row to dock bar to?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to set which row to dock bar to?

 Post Reply Post Reply
Author
Message
d_r_smith View Drop Down
Newbie
Newbie


Joined: 16 November 2007
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote d_r_smith Quote  Post ReplyReply Direct Link To This Post Topic: How to set which row to dock bar to?
    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....

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2007 at 12:59am
Just  set right coordinates.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
d_r_smith View Drop Down
Newbie
Newbie


Joined: 16 November 2007
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote d_r_smith Quote  Post ReplyReply Direct Link To This Post 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. 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.