Path ellipsis (...) in the report items |
Post Reply |
Author | |
MNovaro
Groupie Joined: 20 June 2006 Status: Offline Points: 71 |
Post Options
Thanks(0)
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 |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |