|
-
Jan 13th, 2000, 09:02 AM
#1
Thread Starter
Member
With a multi columned listview shown as a listreport is there a way to save the size of the columns, (after the user as adjusted them to their liking) to the registry so when the program is reopened they won't have to set them again? Thanks in advance
-
Jan 13th, 2000, 04:14 PM
#2
Sure, here's an example:
Private Const DEFAULT_WIDTH = 500 'or whatever you prefer
Private Sub Form_Load()
Dim iCount%, i%
With ListView1
iCount = .ColumnHeaders.Count
For i = 1 To iCount
.ColumnHeaders(i).Width = GetSetting("YourAppName", "SectionName", "Column" & i, DEFAULT_WIDTH)
Next
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim iCount%, i%
With ListView1
iCount = .ColumnHeaders.Count
For i = 1 To iCount
SaveSetting "YourAppName", "SectionName", "Column" & i, .ColumnHeaders(i).Width
Next
End With
End Sub
Good luck!
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|