Print Page | Close Window

Command Bars position

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=17763
Printed Date: 27 November 2024 at 4:24am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Command Bars position
Posted By: alexshemesh
Subject: Command Bars position
Date Posted: 09 January 2011 at 11:49am
hi
Im creating application in C# using 13 version of xtreme codejock sdk.
I have several toolbars on same form.
When i create them they always shown one beneath another from top to bottom in order ive created them.
I need to place them in a row every next toolbar to the right of previous.
How i do it?
I didn't found any properties or functions controlling placement of the toolbar.
The only function i found was MoveAllignedControl from ControlBars,but it has all arguments marked as out.
Thanks






Replies:
Posted By: Aaron
Date Posted: 09 January 2011 at 1:29pm

Hi,

It's VB code but is easy to change into C# Wink

 
Private Sub DockRightOf(BarToDock As CommandBar, BarOnLeft As CommandBar)
    Dim Left As Long
    Dim Top As Long
    Dim Right As Long
    Dim Bottom As Long
   
    CommandBars.RecalcLayout
    BarOnLeft.GetWindowRect Left, Top, Right, Bottom
   
    CommandBars.DocktoolBar BarToDock, Right, (Bottom + Top) / 2, BarOnLeft.Position
End Sub
 
 
Just call:
 
DockRightOf CommandBars(2), CommandBars(1)
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: alexshemesh
Date Posted: 10 January 2011 at 10:20am
Thanks , it works




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net