I build an winforms application in c#.
I'm trying to change the default icons of MSAGL GViewer component:
but I don't find where to do that.
How can I change them?
I build an winforms application in c#.
I'm trying to change the default icons of MSAGL GViewer component:
but I don't find where to do that.
How can I change them?
Copyright © 2021 Jogjafile Inc.

GViewercontrol uses an oldToolBarcontrol to show those buttons. To replace those icons, you can find the toolbar in controls collection of the viewer control and set a newImageListcontaining new images for the toolbar:The image list should have 18 images in below order. When adding images to image list. After adding images, set the
Nameproperty of image at index 2 tozoom.bmpbecause the toolbar use it's name instead of index:Using above images, and
ColorDepthset toDepth24BitandTransparentColorset toMagentahere is the final result:Also as another option you can set
ToolBarIsVisibleproperty ofGViewercomponent tofalseand use your ownToolStriporToolBar. Then when clicking each button, you can call corresponding method of viewer component, likeZoomInPressed,ZoomOutPressed,BackwardButtonPressed,ForwardButtonPressed, ... .Note:
For more information you can take a look at Microsoft Automatic Graph Layout source code repository and source code for
GViewercontrol.