Print Page | Close Window

Previewtext Alignment.

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=16473
Printed Date: 22 November 2024 at 5:50am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Previewtext Alignment.
Posted By: keepITcool
Subject: Previewtext Alignment.
Date Posted: 19 March 2010 at 4:41am
Hi all.
 
Using 13.1 and trying to work with previewtext
 
.SetCustomDraw xtpCustomDrawPreviewItem
 
Private Sub repLic_DrawPreviewItem(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal hDC As stdole.OLE_HANDLE, ByVal left As Long, ByVal top As Long, ByVal right As Long, ByVal bottom As Long, DoDefault As Boolean)
  Item.Alignment = xtpAlignmentCenter
  Item.BackColor = vbBlack
  Item.ForeColor = vbWhite
  Item.Bold = True
  Item.Caption = "WTF?! more bugs?..."
End Sub
the eventhandler works somewhat.. on Populate or Redraw it doesnt work at all, but Once my mouse has moved over a columnHeader!!!!...  the item.caption from the handler shows up in the report. (overwriting the original PreviewText)  All other Item properties I set in the DrawPreviewItem event are ignored.
 
What am i doing wrong....
 
Jurgen
 
Addendum: When I click on the report event is triggered as well. Item.Caption is set Item Properties are ignored.
 


-------------
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)



Replies:
Posted By: Aaron
Date Posted: 19 March 2010 at 3:28pm
Hi,
 
Can you upload test project? 
 
 


-------------
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: keepITcool
Date Posted: 20 March 2010 at 3:13am

Following doesn't work in 13.1  nor 13.3.1.   

i'm sure that if that works the event will work as well. All properties of the PreviewItem other than Caption are ignored...
 
Private Sub Form_Load()
 
  With ReportControl
    .PreviewMode = True
    .Columns.Add 0, "test", 200, 1
    With .Records.Add
      .AddItem "Sara Deer"
      .PreviewText = "this is the default."
    End With
    With .Records.Add
      .AddItem "John Doe"
      .PreviewText = "dummy"
      .PreviewItem.Caption = "this must be red centered"
      .PreviewItem.Alignment = xtpAlignmentCenter
      .PreviewItem.ForeColor = vbRed
    End With
    .Populate
  End With
End Sub


-------------
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)


Posted By: Aaron
Date Posted: 20 March 2010 at 6:05am
Hi,
 
You are right about PreviewItem, seems to be broken somewhere... I never used this before so did set properties just to see what happens but lots of properties you can't set or doesn't seem to work???
 
I'm glad someone uses this and reported it in this post. 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: keepITcool
Date Posted: 20 March 2010 at 7:11am
I'm sure you are.  Sorry to be the messenger of yet another bug. 


-------------
Xtreme :SuitePro (ActiveX) version 13.1.0
Language: VB 6.0
Platform: WinXP/Win7(32+64bit)


Posted By: Aaron
Date Posted: 20 March 2010 at 7:22am
Originally posted by keepITcool keepITcool wrote:

I'm sure you are.  Sorry to be the messenger of yet another bug. 
 
Hi,
 
Please keep on reporting bugs... As I said before, I don't use this option (yet) but if I will I want to be sure that everything works OK. So don't hesitate to report BUGS.
 
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....



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net