Problem with MessageBar icon |
Post Reply |
Author | ||
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
Posted: 04 May 2008 at 10:12am |
|
Hi
I tried the messageBar with the CJ sample. It works as long as I use the ID 32988 for the Warning-image. Any other ID doesn't work for me?!
In my own code I load an XCB file and then add all icons from a prepopulated ImageManager control with:
CommandBars1.Icons.AddIcons ImageManager1.Icons
If I try using an icon from this collection - ID 32988 or not - I never see any image in the MessageBar (Text and Buttons are OK). BTW: all icons are XP-icons with alpha channels.
Using: VB6 checked under Win2000 and WinVista
Any Idea???
Thanks in advance
|
||
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
See Markup caption - "<Image Source='32988'/>" it used '32988' - just replace it for id you need.
Problem only that Markup use Global ImageManager:
CommandBars.GlobalSettings.Icons.LoadIcon App.Path & "\res\Warning.ico", 32988, xtpImageNormal
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
|
Sorry Oleg - I changed your RibbonBar sample as follows
I added an ImageManager and supply an 16x16 icon (XP/alpha, ID=32988)
CommandBars.GlobalSettings.Icons.AddIcons Imagemanager1.Icons
Silly enough - I see still the old warning icon from the original sample. I tried also to CommandBars.GlobalSettings.Icons.RemoveAll - nothing helps...
any idea?
|
||
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
Attach your changes.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
|
Hi,
This will work:
Const ID_IMAGE = 1
CommandBars.GlobalSettings.Icons.RemoveAll
CommandBars.GlobalSettings.Icons.LoadIcon <image path>, ID_IMAGE, xtpImageNormal MessageBar.Message = _ "<Image Source= '" & ID_IMAGE & "'/>" or
MessageBar.Message = _
"<Image Source= '1'/>" Oleg, why can't ID_IMAGE replaced with a string ?
|
||
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
||
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
|
I simply change your .LoadIcon line with that mentioned in my last post. I need to load the icons from ImageManager because we won't load icons at run time.
Thanks for looking at it
|
||
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
||
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
|
|
Problem solved. I had to set GlobalSettings.Icons each time I load a new commandbar file (.XCB).
Thanks
|
||
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
||
enjay
Senior Member Joined: 31 March 2008 Status: Offline Points: 109 |
Post Options
Thanks(0)
|
|
I'm not convinced !
doesn't work, so reusing ImageManager1 is not possible. I don't want to use file I/O for images at runtime in any cases.
Will there be a fix for this ?
/EDIT
The evidence:
|
||
SuitePro ActiveX User
|
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
Hi,
try
CommandBars1.GlobalSettings.Icons.AddIcons Me.ImageManager1.Icons
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
enjay
Senior Member Joined: 31 March 2008 Status: Offline Points: 109 |
Post Options
Thanks(0)
|
|
Using method AddIcons means twice the amount of memory usage, right ? (e.g. ImageManager1 already have 100 images)
|
||
SuitePro ActiveX User
|
||
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 |