Column Resize

The place for threads about TimoSoft ExplorerListView.
Post Reply
sol
Cadet
Posts: 4
Joined: 10 Dec 2013, 14:10

Column Resize

Post by sol »

Hi, I use the ExplorerListView control and have added code to the HeaderClick event and that works fine. But now I see that when I resize a column that also triggers the HeaderClick event.
Is there a way, in the HeaderClick event, to check if the user is only resizing the column (then my code should not run) or actually clicking the header (in this case my code should run)?
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: Column Resize

Post by TiKu »

There are two possible solutions:
1) Use the ColumnClick event, which is more suitable in most cases.
2) Check whether the hitTestDetails parameter has the hhtDivider flag set:

Code: Select all

If (hitTestDetails And hhtDivider) = 0 Then
  ' process click
Else
  ' ignore click
End If
Regards
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
sol
Cadet
Posts: 4
Joined: 10 Dec 2013, 14:10

Re: Column Resize

Post by sol »

Thanks!
And I must say I am very impressed with your quick and acurate responses.
I know this is the wrong forum but…
The on the original VB6 textbox the MaxLength property works, and truncates the .Text even when you set it programmatically like txtName=”xxx”.
Your textbox MaxTextLength works only when you enter values with the keyboard and paste but not when you do txtName=”xxx”. This is not a big problem for us but it could be for others.
Have a nice weekend!
/Sölve
Post Reply