Community
Showing results for 
Search instead for 
Do you mean 
Reply

ACT! 2010 Toolbar

Accepted Solution Solved
Nickel Super Contributor
Posts: 352
Country: Canada
Accepted Solution

ACT! 2010 Toolbar

Does anyone have, or know of, sample code for adding an icon to the toolbar in ACT! 2010?  Not the big easy buttons, but the smaller toolbar below it.

 

Thanks,

Len 

Len Kamerman
ACT! Certified Consultant

Act E-mail Marketing Trainining Course:

http://actsoftware.training

Accepted Solutions
Solution
Accepted by topic author lkamerman
‎09-25-2015 03:20 AM
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: ACT! 2010 Toolbar

Len,

I do something like this...

'-------------------------------------

' Create a toolbar button

'-------------------------------------

 Dim NewToolBarItem As Act.UI.Core.CommandBarButton = New Act.UI.Core.CommandBarButton(MenuText, _

ToolTip, _

Nothing, _

urn, _

InvImageLg, _

InvImageSm)

 

'-------------------------------------

' Add to all the toolbars available

'-------------------------------------

 Dim tBar As Act.UI.Core.CommandBar

For Each tBar In ACTAPP.Explorer.CommandBarCollection

' Only add to toolbar ( Not Menus )

If tBar.Name.ToUpper().IndexOf("TOOLBAR") <> -1 Then

If tBar.Name.ToUpper() = "Contact Detail Toolbar" Then

tBar.ControlCollection.Add(NewToolBarItem)

NewToolBarItem.IsVisible = False

NewToolBarItem.IsVisible = True

Application.DoEvents()

Exit For

End If

End If

Next

 

Hope this helps

-- Jim Durkin

 

View solution in original post


All Replies
Copper Elite Contributor
Posts: 95
Country: USA

Re: ACT! 2010 Toolbar

Nope, I cheated and added my own toolbar, lets me use shiny controls =)

 

-Nick

Nick Bohne
Effective Solutions, Inc.
Solution
Accepted by topic author lkamerman
‎09-25-2015 03:20 AM
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: ACT! 2010 Toolbar

Len,

I do something like this...

'-------------------------------------

' Create a toolbar button

'-------------------------------------

 Dim NewToolBarItem As Act.UI.Core.CommandBarButton = New Act.UI.Core.CommandBarButton(MenuText, _

ToolTip, _

Nothing, _

urn, _

InvImageLg, _

InvImageSm)

 

'-------------------------------------

' Add to all the toolbars available

'-------------------------------------

 Dim tBar As Act.UI.Core.CommandBar

For Each tBar In ACTAPP.Explorer.CommandBarCollection

' Only add to toolbar ( Not Menus )

If tBar.Name.ToUpper().IndexOf("TOOLBAR") <> -1 Then

If tBar.Name.ToUpper() = "Contact Detail Toolbar" Then

tBar.ControlCollection.Add(NewToolBarItem)

NewToolBarItem.IsVisible = False

NewToolBarItem.IsVisible = True

Application.DoEvents()

Exit For

End If

End If

Next

 

Hope this helps

-- Jim Durkin

 
Nickel Super Contributor
Posts: 352
Country: Canada

Re: ACT! 2010 Toolbar

Jim, that did it, thanks for sparing me at least a couple hours of misery!  Works like a charm.

Len Kamerman
ACT! Certified Consultant

Act E-mail Marketing Trainining Course:

http://actsoftware.training