469,945 Members | 1,447 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,945 developers. It's quick & easy.

The problem with scrol bar in list control

I have application which displays dialog containing CListCtrl control.
The OnTimer message handler updates values in this list control.
In case if there are more items then visible area of list control can
display the scroll bar appears.

If user clicks on the scroll bar arrow, the OnTimer message handler
removes all items from list control and populate it again with new range
of visible items and then updates values as usually.

The problem I experience is that if user clicks fast enough on the
scroll bar arrow, the applications sometimes interpret it as double click
event in list control, which has undesirable effect for us.

The problem as I understand it, is that when OnTimer method removes all
items and repopulate list control the scroll bars disappear for the very
short time. This is not visible to user, the control just blinks, but user
thinks that he clicks on scroll bar arrows while he actually clicks inside
list control which is interpreted as double click in client area of list
control.

Can anyone suggest solution how I can overcome this problem?
Thanks
Nov 17 '05 #1
1 1137
>The problem I experience is that if user clicks fast enough on the
scroll bar arrow, the applications sometimes interpret it as double click
event in list control, which has undesirable effect for us.

The problem as I understand it, is that when OnTimer method removes all
items and repopulate list control the scroll bars disappear for the very
short time. This is not visible to user, the control just blinks, but user
thinks that he clicks on scroll bar arrows while he actually clicks inside
list control which is interpreted as double click in client area of list
control.

Can anyone suggest solution how I can overcome this problem?


1. Try disabling the control while it's being repopulated.

If that doesn't work, I'd consider this:

2. Set a flag while the control is in this state and check it in the
handler for the double click event so you don't have the undesirable
effect.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Robin Bonin | last post: by
3 posts views Thread by http://www.visual-basic-data-mining.net/forum | last post: by
1 post views Thread by Goffin | last post: by
2 posts views Thread by Doug Carter | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.