|
-
March 28th, 2001, 09:55 PM
#1
How can I prevent the size of columns of my listview?
Hello,
Could you tell me how can I prevent the size of columns of my listview? Thanks.
-
March 29th, 2001, 12:06 AM
#2
Re: How can I prevent the size of columns of my listview?
Hi
Are u talking about Sizing the Column or Resizing the Column.
U can use the below given statement for
Sizing the Column :-
ListView1.View = LVWReport
ListView1.ColumnHeaders.Add ,,300
The third argument is the Column Width. U can change that accordingly to ur wish.
Take Care Bye Bye
Vijooo
-
March 29th, 2001, 12:37 AM
#3
Re: How can I prevent the size of columns of my listview?
Thank you for your reply.
Actually I don't want the width of column can change. I want to lock it. Could you tell me how to do it?
-
March 29th, 2001, 12:47 AM
#4
Can I lock the width of columns of a listview?
Actually I don't want the size of columns of my listview can change. Could you tell me how can I do that?
-
March 29th, 2001, 04:31 AM
#5
Re: Can I lock the width of columns of a listview?
Hi
If u dont want ur LVW Column to be resized, then
i dont think that there r some solutions for ur requirements. But i suggest u a cheating way to
overcome this problem.
1) Place the following code in Form Load
Private Sub Form_Load()
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add , , "Sample", 500
End Sub
2) Insert a Timer Control and set the Interval to
100.
3) Then Place the following code in the Timer.
Private Sub Timer1_Timer()
ListView1.ColumnHeaders(1).Width = 500
End Sub
This is the first way and there is another way also. U can use an API Call for that.
Const LVSCW_AUTOSIZE = -1
Const LVSCW_AUTOSIZE_USEHEADER = -2
All the Best. Reply me back
Take Care Bye Bye
Vijooo
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
|