Listview columnheader question

  • Thread starter Thread starter rb
  • Start date Start date
R

rb

Hi All,

Is there a property or method to keep the headercolumns from being
resized by the user
for a listview?

I am using Visual Basic in Visual Studio . net 2005

Thank you.

rb
 
I don't get an error when I import this code in 2003 so I think it must work
also in 2003.

I get the message : Me.lstPartijen.WndProc = &H4E


Jan


How do I override the listviews property
 
sorry wrong message.
I get the messageon line Me.lstPartijen.WndProc = &H4E. Is not accesseble
becouse it is protected

Jan
 
That line doesn't make any sense. WndProc is a protected method. You can't
assign anything to it.

You need to use an inherited ListView. Did you copy the code in the link I
posted?

/claes
 
No that's fine.

You say you get an error on the line Me.lstPartijen.WndProc = &H4E. Where
does that line come from? Show your code

/claes
 
that is the line: Me.lstPartijen.WndProc = &H4E

the error is a blue underline in the vb editor

Private Sub FrmRonde_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Me.lstPartijen.WndProc = &H4E

End Sub

where lstpartijen is mij listview. It has 3 columns. I don't want them to
change the size. the column headers are Nonclickable
How must a do it. Can you give me some extra code, how to set each column
not to change? The class has no underline/error

Jan
 
Remove that line. Not sure why you put it in there. The code in the link I
sent you has a complete class with all the stuff needed. Change your
lstPartijen to be an instance of that class (i.e ListViewEx).

/claes
 
Back
Top