Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Setting column width like LVSCW_AUTOSIZE_USEHEADER
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Setting column width like LVSCW_AUTOSIZE_USEHEADER

 Post Reply Post Reply
Author
Message
inmaurik View Drop Down
Groupie
Groupie


Joined: 13 July 2007
Location: Netherlands
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote inmaurik Quote  Post ReplyReply Direct Link To This Post Topic: Setting column width like LVSCW_AUTOSIZE_USEHEADER
    Posted: 20 November 2008 at 4:13am
In the CListCtrl you can set the column width with values LVSCW_AUTOSIZE or LVSCW_AUTOSIZE_USEHEADER.
Is there also a way to add a column and set the width of that column to just fit the caption of that column. I saw you can call BestFit of CXTPReportHeader to fit the content of the column but I haven't found a method that set the width to fit the caption.

Is there a method like CListCtrl::GetStringWidth which calculates the width that is required to fit the string in the column header (and which can be called at the moment of inserting columns)?

Thanks in advance
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.125 seconds.