ActiveBar Support

Started by janttu at 04-20-2009 11:10 PM. Topic has 6 replies.

Print Search Rate
Sort Posts:    
   04-20-2009, 11:10 PM
janttu is not online. Last active: 6/29/2011 8:38:12 PM janttu

Top 50 Posts
Joined on 12-03-2003
Posts 200
Toolbars docked to right

Is there any way of making toolbar to be aligned to the right side of the application window? When window is resized the "right-aligned" toolbars are not following the application window as it is for example in msword.


   Report 
   04-21-2009, 10:28 AM
vbcorner is not online. Last active: 4/22/2011 7:32:02 PM vbcorner

Not Ranked
Joined on 11-24-2004
Posts 7
Re: Toolbars docked to right
It's simple


Private Sub Form_Resize()

Me.ActiveBar31.Left = Me.ScaleWidth - Me.ActiveBar31.Width

End Sub


HTH
   Report 
   04-22-2009, 6:58 AM
janttu is not online. Last active: 6/29/2011 8:38:12 PM janttu

Top 50 Posts
Joined on 12-03-2003
Posts 200
Re: Toolbars docked to right

Yes, I know that. But to make it work with all toolbars, the layout has to be looped and done to all toolbars with each resize callback. This is pretty heavy operation with bigger layout files. Seems to be so that activebar doesn't support this (?). This should work by default in the same way as in other ms applications...


   Report 
   04-23-2009, 1:53 AM
Andrey - DD is not online. Last active: 8/25/2011 5:42:49 PM Andrey - DD

Top 25 Posts
Joined on 08-01-2007
Russia, Novosibirsk
Posts 671

DDStaff
Re: Toolbars docked to right

janttu,

Maybe I missed something but vbcorner's code snippet just keeps entire ActiveBar area with all toolbars, etc. on the right side of application window. Also, I think, its more comfortable to set ActiveBar's AlignToForm property so ActiveBar fills the entire SDIForm's client area so that the control can become an adequate sized container for your controls. So you can place all other controls in a PictureBox, for example, and place PictureBox in ActiveBar client area (by using AutoSizeChildren and ClientAreaControl properties).

Thank you,
Andrey T.


   Report 
   04-24-2009, 7:38 AM
vbcorner is not online. Last active: 4/22/2011 7:32:02 PM vbcorner

Not Ranked
Joined on 11-24-2004
Posts 7
Re: Toolbars docked to right
<BLOCKQUOTE><table width="85%"><tr><td class="txt4"><img src="/Themes/DataDynamics/images/icon-quote.gif">&nbsp;<strong>janttu wrote:</strong></td></tr><tr><td class="quoteTable"><table width="100%"><tr><td width="100%" valign="top" class="txt4"><P>Yes, I know that. But to make it work with all toolbars, the layout has to be looped and done to all toolbars with each resize callback. This is pretty heavy operation with bigger layout files. Seems to be so that activebar doesn't support this (?). This should work by default in the same way as in other ms applications...</P></td></tr></table></td></tr></table></BLOCKQUOTE>

No. The above code work con whole AB control (if it isn't 'aligned' to form) therefore don't need anything.

If you use a 'aligned' (top or bottom) AB then should align each Band; using code like below.
This sample code align a "band" to right, by calculating the width for all buttons to apply the correct DockingOffset :
<font face="Lucida Console" size="2">
Public Sub AlignBandToRight(ByRef f As Form, ByRef tBandName As ActiveBar3LibraryCtl.Band, Optional bUseCaptionBelow As Boolean = True)
Dim L As Long
Dim btn As ActiveBar3LibraryCtl.Tool

For Each btn In tBandName.Tools
' GB 24-nov-2008 09.10 : I want to put Caption below: Default YES
If bUseCaptionBelow Then
btn.CaptionPosition = ddCPBelow
btn.Style = ddSIconText
End If
' GB lun 29-dic-2008 23.52 : calc width-button for visible buttons only.
If btn.Visible Then
L = L + btn.Width
End If
Next

With tBandName
If bUseCaptionBelow Then 'Default: YES
f.AB.Height = 720
.Height = 720
.Top = f.ScaleHeight - .Height
End If
.DockingOffset = f.ScaleWidth - L
End With

End Sub
</font>

HTH
   Report 
   04-29-2009, 3:59 AM
janttu is not online. Last active: 6/29/2011 8:38:12 PM janttu

Top 50 Posts
Joined on 12-03-2003
Posts 200
Re: Toolbars docked to right

I don't want all the toolbars to be aligned to right all the time. This is the case you're talking about, right? I want the toolbar alignment to work as in ms word; once you've repositioned the toolbar to the right side of the application window and after that resize the window (make smaller then larger) the appropriate toolbar stays right-aligned (as long as the window size isn't larger than in the situation the toolbar was right-aligned). You can test this with ms word. For this I'm looking for solution. Second of all I don't want the toolbar to use all the space from the dockline. There's no point in that solution.


   Report 
   04-29-2009, 6:08 AM
vbcorner is not online. Last active: 4/22/2011 7:32:02 PM vbcorner

Not Ranked
Joined on 11-24-2004
Posts 7
Re: Toolbars docked to right
I use MS Word 2007, so I cannot figure your problem.
Sorry.
   Report 
GrapeCity » Product Support » ActiveBar Suppo... » Re: Toolbars docked to right

Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
All trademarks mentioned are the property of their respective owners.