Path ellipsis (...) in the report items
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=4512
Printed Date: 30 April 2025 at 5:13am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Path ellipsis (...) in the report items
Posted By: MNovaro
Subject: Path ellipsis (...) in the report items
Date Posted: 29 June 2006 at 8:38am
I'd need to use a single item in the report control to contain a path. Since the path name could be "long", I need to truncate it, using ellipsis (...) in the name.
Is there any simpler way to implement this??
I found this way: using the DrawItem event, I draw directly on the report ...but it seems too "complicated" for a simple task like this...
Private Sub grdImportSts_DrawItem(ByVal Row As XtremeReportControl.IReportRow, _ ByVal Column As XtremeReportControl.IReportColumn, _ 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) Dim tR As RECT If Item.Index = ID_COL_FILENAME Then tR.right = right - 4 tR.left = left + 4 tR.bottom = bottom - 2 tR.top = top + 1 DrawText hDC, Item.Value, -1, tR, DT_PATH_ELLIPSIS Or DT_SINGLELINE Or DT_MODIFYSTRING DoDefault = False
End If
End Sub
|
Replies:
Posted By: sserge
Date Posted: 03 July 2006 at 4:32am
Hi,
No other way. Whether you're ok with ellipsis in the end of the string (DT_END_ELLIPSIS) by default, or you're implementing it as you described above...
-- WBR, Serge
|
|