Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Need help with preview text
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Need help with preview text

 Post Reply Post Reply
Author
Message
Axegrinder View Drop Down
Newbie
Newbie


Joined: 12 December 2011
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Axegrinder Quote  Post ReplyReply Direct Link To This Post Topic: Need help with preview text
    Posted: 12 December 2011 at 11:20pm
Hi.
 
I would like the preview text below each report item to show the entire comment, not just the first three lines.
 
Can anyone please advise?
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: 13 December 2011 at 5:04pm
Hi,
 
I don't use previewItem but I guess this should work:
 
in form Load event
 
Me.wndReportControl.SetCustomDraw xtpCustomMeasurePreviewItem
 
 
Private Sub wndReportControl_MeasurePreviewItem(ByVal Row As XtremeReportControl.IReportRow, ByVal hDC As stdole.OLE_HANDLE, ByVal Width As Long, Height As Long)
 
   Height = 100
 
End Sub
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
Axegrinder View Drop Down
Newbie
Newbie


Joined: 12 December 2011
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Axegrinder Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2011 at 5:33pm
Thanks for that, but I had figured that much out by myself.
 
The question is, rather than just setting the height = 100, is there a way to measure the text to be displayed and set the height to the appropriate amount? All I can do currently is guess based on the number of linefeeds in the text.
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: 14 December 2011 at 1:02pm
Hi,
 
Did you try to set alignment to .Record.PreviewItem.Alignment = xtpAlignmentWordBreak? If so height should be calculated right way. I remember there was an issue once regarding linebreaks in previewitem (not sure) so try to search forum for that.
 
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
 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.