Print Page | Close Window

Setting column width like LVSCW_AUTOSIZE_USEHEADER

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=12735
Printed Date: 16 May 2024 at 6:52pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Setting column width like LVSCW_AUTOSIZE_USEHEADER
Posted By: inmaurik
Subject: Setting column width like LVSCW_AUTOSIZE_USEHEADER
Date 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



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