Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Path ellipsis (...) in the report items
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Path ellipsis (...) in the report items

 Post Reply Post Reply
Author
Message
MNovaro View Drop Down
Groupie
Groupie
Avatar

Joined: 20 June 2006
Status: Offline
Points: 71
Post Options Post Options   Thanks (0) Thanks(0)   Quote MNovaro Quote  Post ReplyReply Direct Link To This Post Topic: Path ellipsis (...) in the report items
    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
 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
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.156 seconds.