Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

The list view only expose the Scrollable property, which enable/disable the scroll bar. It doesn't support:

- Scroll event

- Viewable area of the list view when scrolling.

 

My problem is I make a customize listview, when I double click on a "cell", a text box is put on the list view to allow edit cell's value.

But when editing the text box, user can scroll the list view left-right, but the text box stay at the same place so it looks funny.

 

Anyone have the same problem like me?

Posted

Yes, the lack of the Event is a problem and I've requested it through the MVP program a few times now, so hopefully we'll see this event in the future, so you can attach to the scroll bar easily (and i'm sure there's a way you can listen to the windows messages coming through to do it, but i can't say i'd know how).

 

In the mean time, just out of curiosity, have you tried adding your TextBox to the Controls Collection of your ListView to see if it scrolls with everything then?

  • 3 weeks later...
Posted (edited)

I've found the solution for this

Override the WndProc function ( it is available for any control)

Here we can catch every message window pass to the control.

Catch WM_SCROLL to know when the list view is scrolling

Edited by Night

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...