Gylphs - expand/collapse index?
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=12868
Printed Date: 24 November 2024 at 5:04am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Gylphs - expand/collapse index?
Posted By: Andrew666
Subject: Gylphs - expand/collapse index?
Date 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
|
Replies:
Posted By: SuperMario
Date Posted: 10 December 2008 at 11:53am
Index 0, 1 - Expand icons, 2,3,4,5 - Checkbox, 6, 7 sort arrows.
|
Posted By: Andrew666
Date Posted: 13 December 2008 at 2:28pm
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
|
Posted By: Andrew666
Date Posted: 22 December 2008 at 9:05am
... so is this a bug or is there a work-around to insert icons with ID of 0 for use with glyphs? Thanks.
|
Posted By: Aaron
Date Posted: 23 December 2008 at 4:15am
Hi,
You could load bitmaps from ImageManager. It should work but it doesn't...
With wndReportControl
With .PaintManager
With .Glyphs .RemoveAll .AddBitmap ImageManager.Icons.GetImage(ID_REPORT_COLLAPSE, 16).Handle, 0, xtpImageNormal, False
.AddBitmap ImageManager.Icons.GetImage(ID_REPORT_EXPAND, 16).Handle, 1, xtpImageNormal, False
End With
End With
End With
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....
|
Posted By: Aaron
Date Posted: 25 December 2008 at 3:51am
Hi,
I did another attempt... because I noticed that images were loaded in a single bitmap side by side...
With wndReportControl
With .PaintManager
With .Glyphs .RemoveAll .AddBitmap ImageManager.Icons.GetImage(ID_REPORT_GLYPHS_FIRSTIMAGE, 16).Handle, Array(0,1,2,3,4,5,6,7) , xtpImageNormal, True
End With
End With
End With
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....
|
Posted By: Oleg
Date Posted: 25 December 2008 at 6:08am
Handle indeed return to handle of all icons. Beeter just use AddIcons method:
.Glyphs.AddIcons ImageManager.Icons
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: Aaron
Date Posted: 25 December 2008 at 6:38am
oleg wrote:
Handle indeed return to handle of all icons. Beeter just use AddIcons method:
.Glyphs.AddIcons ImageManager.Icons |
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....
|
Posted By: Aaron
Date Posted: 25 December 2008 at 10:57am
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 - https://forum.codejock.com/forum_posts.asp?TID=9492 just in case...
https://forum.codejock.com/uploads/20081225_104235_Test_ImageManag.zip - uploads/20081225_104235_Test_ImageManag.zip
------------- 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....
|
Posted By: Oleg
Date Posted: 26 December 2008 at 1:11am
https://forum.codejock.com/uploads/20081226_011131_Icons.zip -
Updated project:
uploads/20081226_011131_Icons.zip
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: Aaron
Date Posted: 26 December 2008 at 3:00am
oleg wrote:
https://forum.codejock.com/uploads/20081226_011131_Icons.zip -
Updated project:
uploads/20081226_011131_Icons.zip |
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....
|
Posted By: Oleg
Date Posted: 26 December 2008 at 4:32pm
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
|
Posted By: Andrew666
Date Posted: 28 December 2008 at 12:15pm
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
|
Posted By: Aaron
Date Posted: 29 December 2008 at 9:49am
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....
|
Posted By: Oleg
Date Posted: 30 December 2008 at 1:08am
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
|
Posted By: Aaron
Date Posted: 30 December 2008 at 1:19am
oleg wrote:
Hi,
Such code can work in WindowsXP/Vista but not in older OS that doesn't support Alpha icons :( |
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....
|
Posted By: SuperMario
Date Posted: 05 January 2009 at 11:23am
Posted By: Aaron
Date Posted: 05 January 2009 at 11:45am
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....
|
|