Double Use of Icons = Problems |
Post Reply |
Author | |
finn
Groupie Joined: 11 February 2005 Location: Germany Status: Offline Points: 60 |
Post Options
Thanks(0)
Posted: 07 April 2005 at 8:14am |
Hello! I load my Icons into an Array (like in the ShortCutbarReport Sample). That works very fine! But when I use an twice, then one of them won't be shown. Here is an example: [...]toolbarIconArray(25) = ID_WEB_SEARCH toolbarIconArray(25) = ID_OUTLOOK_TODAY [...] ImageManager.Icons.LoadBitmap App.Path & "\Icons\imagelist.bmp", toolbarIconArray, xtpImageNormal When I do it this way around, then the Icon for the Button with the ID "ID_OUTLOOK_TODAY" isn't visible. There only stands text. I don't want to load the icons into two arrays. Is there a way for double use of one icon? Yours, Finn! PS.: Sorry for my bad English, but I'm from Germany! |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
You can't assign multiple IDs to the sample element in the array, in this
case, you would always see the second image. To fix this, set the
IconId property of the controls in your toolbar to point to the same
image (only added once) in your image manager.
[...] toolbarIconArray(25) = ID_WEB_IMAGE [...] [...] Set ControlEdit = CommandBars.ActiveMenuBar.Controls.Add(xtpControlPopup, 0, "&Edit", -1, False) With ControlEdit.CommandBar.Controls Set Control = .Add(xtpControlButton, ID_EDIT_UNDO, "Undo", -1, False) Control.IconId = ID_WEB_IMAGE Set Control = .Add(xtpControlButton, ID_EDIT_CUT, "Cu&t", -1, False) Control.IconId = ID_WEB_IMAGE End With [...] Edited by SuperMario |
|
finn
Groupie Joined: 11 February 2005 Location: Germany Status: Offline Points: 60 |
Post Options
Thanks(0)
|
Thank you! Yours, Finn! |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |