Gylphs - expand/collapse index? |
Post Reply |
Author | |
Andrew666
Groupie Joined: 15 October 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
Posted: 07 December 2008 at 2:56pm |
By trial and error I have used the (new in 12.1) .PaintManager.Glyphs.AddIcons method to add a "collapsed" icon at index=1 for the ReportControl.
However, whilst I can get other indexes to work, e.g. with column sort icons, I can't get an index for the "expanded" state to work - I always get the default icon displayed. I presume this is index=2, but I have tried lots of others. Am I missing something? Thanks. Regards --Andrew |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Index 0, 1 - Expand icons, 2,3,4,5 - Checkbox, 6, 7 sort arrows.
|
|
Andrew666
Groupie Joined: 15 October 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Thanks for that --- however, correct me if I'm wrong, but you don't appear to be able to add an image of command "0" to an ImageManager directly (at least in VB).
It also appears that "AddIcon" will not work with command=0; the only method I found that worked was LoadBitmap... but clearly that's not ideal as you end up with loose bmp files. However, having got the glyphs setup it certainly works fine. I now have my Vista-style folder tree! Thanks for the enhancement. Regards --Andrew |
|
Andrew666
Groupie Joined: 15 October 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
... so is this a bug or is there a work-around to insert icons with ID of 0 for use with glyphs? Thanks.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
You could load bitmaps from ImageManager. It should work but it doesn't...
.RemoveAll .AddBitmap ImageManager.Icons.GetImage(ID_REPORT_COLLAPSE, 16).Handle, 0, xtpImageNormal, False It looks like GetImage is returning same handle for every image in Manager
If this would be fixed you should be able to load images from ImageManager and it wouldn't matter what ID was assigned to it.
|
|
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.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I did another attempt... because I noticed that images were loaded in a single bitmap side by side...
.RemoveAll .AddBitmap ImageManager.Icons.GetImage(ID_REPORT_GLYPHS_FIRSTIMAGE, 16).Handle, Array(0,1,2,3,4,5,6,7) , xtpImageNormal, True And this isn't working neither if more than 8 images are loaded into ImageManager (note added 25-12-2008)
Note: ID_REPORT_GLYPHS_FIRSTIMAGE = id of first image in ImageManager (the collapse image for ReportControl))
|
|
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.... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Handle indeed return to handle of all icons. Beeter just use AddIcons method:
.Glyphs.AddIcons ImageManager.Icons
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Oleg,
That is why we can't use it, because ImageManager icon ID can't be assigned as 0 (as Andrew666 complaint about) and first icon doesn't show. So workaround (above) is needed to get all images from ImageManager needed for .Glyphs icons starting with index = 0.
I don't see any other way, maybe you have something in mind we can use instead...
About handle: why does ImageManager.Icons.GetImage(id, 16).Handle return same handle for every icon in Imagemanager?
|
|
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.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I have managed to create a test project for this. It looks like the images will be created for Glyphs images (from ImageManager)
I have to point you to post: https://forum.codejock.com/forum_posts.asp?TID=9492 just in case...
|
|
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.... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Oleg,
If Hans Klok ever needs a new assitant, you could be the one Oleg... I know magicians don't tell how they do it, but could you make an exception this time?
btw Did you check the .Handle property? Why it returns same handle everytime?
Thanks a lot
|
|
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.... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Secret somewhere between "export" and "import" magic words :)
As we wrote in release notes for 11.2.1, ImageManager now have only 2 GDI Bitmaps that contains all icons. So developers can have 1000 icons in single image manager and don't worry about GDI objects number. So now Handle return common bitmap handle :(
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Andrew666
Groupie Joined: 15 October 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
Thanks for that fix Oleg --- I don't know how you got an icon of index=0 into the example imagemanager you uploaded, but if I copy/paste it into my project I can then replace it with my own bitmaps and all is working.
Regards --Andrew |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Oleg,
OK, now I understand how you did this My approach would be less work and easier to do and it wouldn't matter what ID was assigned to it. The downside is when bitmaps with alpha were added, stdPicture can't deal with those images
I tried something else because of the alpha images...
Dim im As Object
For i = 500 To 507 Set im = ImageManager.Icons.GetImage(i, 16).CreatePicture(xtpImageNormal) wndReportControl.PaintManager.Glyphs.AddIcon im, i - 500, xtpImageNormal Next i But I'm not sure if this is a correct way to do it. It looks like it's working though Would be nice if it could like this...
Thanks
|
|
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.... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Such code can work in WindowsXP/Vista but not in older OS that doesn't support Alpha icons :(
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi Oleg,
Thanks for reply. If OS doesn't support alpha icons, I can't use alpha icons anyway, right?
Thanks
|
|
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.... |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi SuperMario,
What does this mean?
A few replies back Oleg said: Hi,
Such code can work in WindowsXP/Vista but not in older OS that doesn't support Alpha icons :(
And what does this mean?
|
|
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.... |
|
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 |