ActiveBar Support

Started by zazaturman at 06-30-2009 6:25 AM. Topic has 1 replies.

Print Search Rate
Sort Posts:    
   06-30-2009, 6:25 AM
zazaturman is not online. Last active: 9/24/2010 1:54:31 PM zazaturman

Not Ranked
Joined on 06-26-2009
Posts 3
set Tool position by code
Hi.
Can someone help me out with this:
I'd like to add new tool from code and need to change the position of the newly added tool inside the band.
In other words: assume we have band with 4 tools and I'd like to add new tool after 2-nd tool.

ActiveBar.Bands(BandName).Tools.Add ToolID, ToolName

Thanks in advance.

Ilia

   Report 
   06-30-2009, 6:55 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: set Tool position by code

Attachment: abNewToolInsert.zip
zazaturman,

First, you can add a new Tool to collection by using Tools.Add method:
Set buttonTool = ActiveBar31.Tools.Add(111, "NewTool")
buttonTool.Caption = "NewTool"
buttonTool.Style = 3

After this you can insert newly created tool by using Insert method:

ActiveBar31.Bands("Band1").Tools.Insert 2, ActiveBar31.Tools("NewTool")

Please find the attched sample which adds new tool to band after 2nd tool.

Thank you,
Andrey T.
   Report 
GrapeCity » Product Support » ActiveBar Suppo... » set Tool position by code

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