![]() |
Problem with MessageBar icon |
Post Reply
|
| Author | ||
Fabian
Senior Member
Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
Quote Reply
Topic: Problem with MessageBar iconPosted: 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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 May 2008 at 2:17am |
|
|
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)
Quote Reply
Posted: 05 May 2008 at 11:09am |
|
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 06 May 2008 at 1:59am |
|
|
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)
Quote Reply
Posted: 06 May 2008 at 3:06am |
|
|
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)
Quote Reply
Posted: 06 May 2008 at 8:02am |
|
|
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)
Quote Reply
Posted: 06 May 2008 at 11:38am |
|
|
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)
Quote Reply
Posted: 20 May 2008 at 8:25pm |
|
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 21 May 2008 at 1:29am |
|
|
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)
Quote Reply
Posted: 21 May 2008 at 5:02am |
|
|
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 |