Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Image display goes wrong
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Image display goes wrong

 Post Reply Post Reply
Author
Message
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Topic: Image display goes wrong
    Posted: 17 September 2010 at 11:20am
Hi
 
Up to 13.3 I displayed 64 x 64 pixel images with:
 
ReportControl1.Icons.AddImage Picture1.picture, i+1000,xtpImageNormal,False
Item.Icon = i+1000
 
Since 13.4 that doesn't work. 16 x 16 pixel is no problem, but larger doesn't show anymore. The row height was not changed.
 
Do I miss something?
 
Thanks for help
Fabian
 
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 17 September 2010 at 3:11pm
Hi Fabian,
 
I tried same but the row is autosized to full size image, don't have to change rowheight. With V13.3.1 and V13.4 both work as should. Would it be different and I have to add code which I didn't have to in previous versions, it would a bug and I wouldn't add SOLVED to my post because accidentally some event exists, to resize row Wink 
 
Is it possible to upload test project which shows your problem?
 
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....
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2010 at 3:02am
Hi Aaron
 
The problem goes deeper as I thought.
 
If you allow MeasureRow by ReportControl1.SetCustomDraw xtpCustomMeasureRow AND YOU DO NOTHING in this event - it works. As soon as you doesn't allow this event to fire, images >16 pix wan't show Confused
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2010 at 3:27am
Hi Fabian,
 
Do you need MeasureRow event? If not, just set wndReportControl.PaintManager.FixedRowHeight = False
 
If you do need event, I guess you have to calculate height of image. I don't know if this is by design, better ask support Big smile
 
Good luck
 
 
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....
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2010 at 3:43am
Hi Fabian,
 
Looking at it again... If you allow RC to calculate rowheight depending on it contents (FixedRowHeight = False) Icon is showing OK, but if you decide to measure row yourself and calculate rowheight to small, RC doesn't show Icon. Suppose you want measure rowheight yourself and RC still forces rowheight to fit Icon then you would be right!!!
 
So I believe it is implemented correctly Big smile
 
Setting FixedRowHeight = False is best option to allow RC calculate rowheight automatically.
 
 
 
 
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....
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2010 at 5:05am
Hi Aaron,
 
Thanks for looking at this 'feature'. But I have set RC.PaintManager.FixedRowHeight=False. But the behaviour is as described (v13.4).
 
Have a nice week end
Fabian
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2010 at 6:12am
Hi Fabian,
 
I don't know why it doesn't work for you? I attached test project that works OK for me.
 
Try to (during runtime)
 
  • Set FixedRowHeight True <> False
  • Set CustomMeasureRow (internal counter will increase height of row for every click)
  • Resizing Column will affect icon also when columnwidth is too small !!!

uploads/3701/TestReportIcon.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....
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2010 at 6:55am
Thanks Aaron for your effort. Yes you are right. If I set FixedRowHeight = False AFTER loading the icons it works. If I set it before loading data this property has no effect.
 
Regards
Fabian
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2010 at 7:45am
Hi Fabian,
 
I put (with my test project) the line: wndReportControl.PaintManager.FixedRowHeight = False on a lot of different places, it ALWAYS works OK Big smile So I'm curious where and when it fails.
 
Please show me your code when it fails or change my test project and upload it inhere again.
 
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....
Back to Top
Fabian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 22 November 2004
Location: Switzerland
Status: Offline
Points: 336
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fabian Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2010 at 9:52am
Hi Aaron,
 
RC.PaintManager.FixedRowHeight=False
RC.SetCustomDraw xtpCustomBeforeDrawRow
 
DOES NOT WORK
 
RC.SetCustomDraw xtpCustomBeforeDrawRow
RC.PaintManager.FixedRowHeight=False
 
WORKS (tested with your sample, v3.4)
 
Regards
Fabian
Product: Xtreme SuitePro (ActiveX) version 16.2.3

Platform: Windows 7 (32bit)

Language: Visual Basic 6.0 / SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 18 September 2010 at 11:20am
Hi Fabian,
 
Now I see what you are doing "wrong" Wink
 
You have wndReportControl.SetCustomDraw xtpCustomBeforeDrawRow and not xtpCustomMeasureRow If xtpCustomMeasureRow is enabled, MeasureRow event is fired and you are able to set Height manually.
 
OK, I agree that this is strange and should be looked at, or at least mentioned in the help file if this is by design. I'm glad you found this "bug"
 
Thanks for that, I will add this to my list.
 
 
 
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....
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.