|
-
Oct 28th, 2001, 10:41 PM
#1
Thread Starter
Hyperactive Member
ListBox Scroll Bar... Tough Question indeed.
I am trying to understand the ScrollBar of a Listbox. Is it a window? It doesn't seem to have a Window handle of itself. Any body has any idea how to control it?
Well, let me tell you the actual problem. If I set capture to a list box, it won't scroll if you try to. It will, but the first time you click on the ScrollBar, the capture will be lost!
I would rather like to set the capture for the ScrollBar itself, but don't seem to have any way of abtaining the window handle of the ScrollBar.
Any Ideas?
Please?
Abu Haider
____________________________
100% Data Validation for the MS DataGrid Control. Plus Support for Custom and Foreign Lists, DatePicker and much more...
The DataGridEnhancer
I often point to a place where the problem has been discussed, instead of giving you the code that solves it. This is for good, may be you will understand some day...
-
Oct 29th, 2001, 05:16 AM
#2
If you go into spy++ you'll see that the scroll bars for a listbox are graphical controls, like a label, not a window as you would expect.
The mousemove & click events are captured in terms of the rectangle of the listbox vs the position of the cursor. I don't have a suggestion, except to find another type of control. For example, use a textbox, and a vertical scroller to the side. Then you have to write code to support scrolling, multiple selects, and so on.
-
Oct 29th, 2001, 09:35 AM
#3
Thread Starter
Hyperactive Member
Not surprising by now
Thanks Jim,
Well, as you can see, the ScrollBar being a lightweight control wouldn't have bothered me. But why do I loose the capture if I click on it? And why doesn't it Scroll as long the ListBox has the Capture? After all, it is part of the ListBox, if the message goes to ListBox, it should direct it to the ScrollBar isn't it?
Using a combination to mimic the ListBox is way too much for the small functionality I need here.
Thanks Jim, let me see if I find any work around
Abu Haider
____________________________
100% Data Validation for the MS DataGrid Control. Plus Support for Custom and Foreign Lists, DatePicker and much more...
The DataGridEnhancer
I often point to a place where the problem has been discussed, instead of giving you the code that solves it. This is for good, may be you will understand some day...
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
|