Listview ScrollBar BIGGER -

  • Thread starter Thread starter Kovan A.
  • Start date Start date
K

Kovan A.

since i couldnt find anyway to scroll a listview having disabled the
scrollbars, i am left with no choice but to make the current scrollers
bigger
any leads as to which beast i am up against for making the scrollers just
bigger?

Kovan,
 
Kovan A. said:
since i couldnt find anyway to scroll a listview having disabled the
scrollbars, i am left with no choice but to make the current scrollers
bigger
any leads as to which beast i am up against for making the scrollers just
bigger?

Kovan,

In the years I've worked with windows forms, I've seen the question of
customizing scrollbars for a control asked again and again, and I've yet to
see a good answer. Neither through the framework nor with some kind of
sendmessage call. Strange that this has been overlooked.

The best you will get is a recommendation to change the default
scrollbar size in the control panel.

Sorry!

Erik
 
Kovan A. said:
since i couldnt find anyway to scroll a listview having disabled the
scrollbars, i am left with no choice but to make the current scrollers
bigger
any leads as to which beast i am up against for making the scrollers just
bigger?

Kovan,

OK, I lied. To satisfy my own curiosity, I looked around a bit and
found this:

http://www.codeproject.com/miscctrl/resizescrollbar.asp

You could take his code and make an ActiveX wrapper from his CXComboList
class. This may be more effort than it's worth, but there you go.

Erik
 
Not sure which scrollbar you are trying to replace since I can't go back and get
your original post,
but there are some hacks you might use. Just make sure to disable the scrollbar
and then use the following
concepts.

1. Use GetItemAt specifying the bottom of the ListView's client area.
2. EnsureVisible one item further down than is returned by GetItemAt.

or

1. Use GetItemBounds
2. Calculate an approximate number of visible items given the visible region.
3. Use EnsureVisible using TopItem + some offset greater than the approximate
number of visible items.

or

Pump some messages to simulate the scroll. These would be WM_SCROLL messages.
Since I would actually
like scrollable control of many of the WinForms controls, I might make a small
scroll library for working with
scrollbars and handling scrollable regions. Would be a couple of days though,
so I'd try one of the above hacks.
 
Erik Frey said:
In the years I've worked with windows forms, I've seen the question of
customizing scrollbars for a control asked again and again, and I've yet to
see a good answer. Neither through the framework nor with some kind of
sendmessage call. Strange that this has been overlooked.

Not strange at all, changing the appearence of common GUI controls is the
most annoying thing a programmer can do. It shoul be prosecuted to the
greatest extent possible under criminal law (I've always wanted to write
that line). Well, okay, animation that you cannot put off is even worse but
it take the same kind of programmer. If you ever figure out how to do it,
don't! The only descent thing to do is to follow whatever desktop scheme is
active and any serious development environment will do just that by default.
The appearence of common GUI controls is not yours, if you touch it your
hands should be slapped real hard... wel, you get my point.

Martin.
 
Martin Maat said:
Not strange at all, changing the appearence of common GUI controls is the
most annoying thing a programmer can do. It shoul be prosecuted to the
greatest extent possible under criminal law (I've always wanted to write
that line). Well, okay, animation that you cannot put off is even worse but
it take the same kind of programmer. If you ever figure out how to do it,
don't! The only descent thing to do is to follow whatever desktop scheme is
active and any serious development environment will do just that by default.
The appearence of common GUI controls is not yours, if you touch it your
hands should be slapped real hard... wel, you get my point.

Martin.

Generally, I would agree with your idealism, but MS should still provide
programmers with a way to break the rules. Without struggling too hard, I
can think of a number of applications (touch-screen inventory, reviewing
medical records, etc) that could benefit from oversized scroll-bars, without
forcing the rest of the system to follow the same scheme.

Believe it or not, it is possible that MS, in all their wisdom, might
actually miss out on an important design concept within their standards
:)

So we should be allowed to break them.

Erik
 
Erik Frey said:
point.

Generally, I would agree with your idealism, but MS should still provide
programmers with a way to break the rules.

They do. Far too often in many people's opinion :-). Most of the Microsoft
bashing originates from providing the customers what they want.
Without struggling too hard, I can think of a number of
applications (touch-screen inventory, reviewing medical
records, etc)

Okay, but it would be stretching the platform. The Windows GUI was not
designed for touch screens so it would require some enhancements or
extensions or something completely new and those are being developed as we
speak (ink for tablet PC's for instance). While it isn't there yet and you
need it I would prefere a custom control over a mutulated standard control.

I agree that flexibility, making things easy to achieve, is basically a good
thing but the result is often too annoying. The fact that "any idiot can
make a GUI application" using this or that tool usually results in a lot of
idiots actually doing just that :-).

Martin.
 
Back
Top