HOW TO
This article explains how to set the icon for a new button. An icon can be any size, but the IconMgr shows only those that are less than 24x24 pixels by default. The script below opens an Icon manager that displays icons of all sizes.
Code:
'-- Create a button and prompt the user to choose an icon for it
newButton = Button.Make
newButton.SetIcon(IconMgr.Show(0)) '<-- IconMgr.ShowWithDefault can be used as well
newButton.SetClick("Script")
newButton.SetUpdate("Script")
av.GetActiveGUI.GetButtonBar.Add(newButton, -1)
Note:
Refer to ArcView Help for more information on the class IconMgr and the requests ShowWithDefault or Show.
Article ID:000003997
Get help from ArcGIS experts
Download the Esri Support App