Easy way to dock CommandBars/Ribbonbar to top |
Post Reply |
Author | |
CapoPezzio
Groupie Joined: 13 April 2010 Status: Offline Points: 25 |
Post Options
Thanks(0)
Posted: 13 April 2010 at 3:11pm |
Hi.
I was hoping to change from ActiveBar (DataDynamics) to CommandBars-menus (Ribbonbar) in all our forms (>100). We are using vb6. I am trying to find an easy way. I have created an object wich creates the menus itself. We use layout-files to dynamically create the ActiveBars and I have mangaed to create an object whick create CommanBars menys (as Ribbonbars) of the same layout. And it work great. It is really good-looking. But I have a problem when I am trying to just swap the AcitveBar-component with the CommanBars component in my excisting forms. Where the ActiveBar always dock itself to the top, my CommnadBars doesnt. We use a tab-component from ComponentOne a lot wich has an Allign-property set to Fill. When we use ActiveBar the menu dock itself to the top and the Tab-control comes under and fill the rest of the form. With CommandBars the Tab-control fill the entire form and my menu doesnt show. (it is behind). I am tryning to find the easiest way to dock my COmmandbars-control to the top, because there are many many forms that I will implement this to if it workds. Anyone can help me? This is my code sofar: Set Ribbonbar = theMenu.AddRibbonBar("The Ribbon") Ribbonbar.EnableDocking xtpFlagAlignTop 'xtpFlagStretched Ribbonbar.Position = xtpBarTop theMenu is my CommandBars-control which is on the form Please help. Would really lift our program We are using Xtreme SuitePro ActiveX v12.1.0 - by the way |
|
gvidali
Newbie Joined: 03 April 2009 Location: United States Status: Offline Points: 7 |
Post Options
Thanks(0)
|
I solved the same issue with few lines of code.
1 -- Set the "align" property of your tab control or elastic control to asNone (0 - zero). 2 -- In the Resize event of your commandbar, use this snippet (control c1, in this case, is an elastic control)... If Me.WindowState <> vbMinimized Then CommandBars1.GetClientRect iLeft, iTop, iRight, iBottom c1.Move iLeft, iTop, iRight, iBottom - iTop End If Hope this helps... Giorgio |
|
Baldur
Senior Member Joined: 22 November 2006 Location: Germany Status: Offline Points: 244 |
Post Options
Thanks(0)
|
You can use ResizeClient-Event of the CommandBar. This works also if your form is being resized.
|
|
CapoPezzio
Groupie Joined: 13 April 2010 Status: Offline Points: 25 |
Post Options
Thanks(0)
|
Thanks a lot. Both works. Was just hoping that there was a simple property on the control to dock it to the top (it is a toolbar-control afterall). No I have to add an elastic to each of our forms. Not that much work, but anyway.... thanks a lot
|
|
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |