Re: ListView.AutoResizeColumns


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Brian Levantine on January 23, 2014 at 21:50:55:

In Reply to: ListView.AutoResizeColumns posted by Grant Foraker on January 20, 2014 at 11:15:28:

Hi Grant. It's not a good idea for us to add specialized code the a general framework. However, the nice thing about a generalized framework is that it's easy to extend in your own code. Instead of trying to automate the sizing process, let the user decide what work best for them. Then you can save the settings for next time:) Here's some code that can be called from your exit handler to save off the column widths. Example works in Dlg10.ibs to which I'll add it for the next release.

! I'll be adding this code to CosWin.ibs
COS.ListView.GetColumnWidth:
coswParam = cosItemId
coslParam = 0
cosMessage = LVM.GETCOLUMNWIDTH
cosGetResult = TRUE
Gosub COS.SendDlgItemMessage
cosWidth = cosFuncResult
Return

I'll be adding this code to Dlg10.ibs
SaveSettings:
cosCtlId = IDC.LIST1
for cosItemId = 0 To 5
Gosub COS.ListView.GetColumnWidth
Print "Column";cosItemId;" width = ";cosWidth
Next cosItemId
Return



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]