Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » scrollbar width Collapse All
Subject Author Date
Eric guez Jul 23, 2010 - 12:26 AM

Hi !

I use a CExtNCSB<CExtListCtrl> to have skinned scrollbars (in my example I use blackdiamond).

Is it possible to use 2 different scrollbar width depending on the normal/pressend/... status ?
My goal is to have a very small scroll bar (to indicate position) while not using it.

Thanks

Technical Support Jul 23, 2010 - 3:48 AM

Thank you for the interesting question. We would like to ask you to tell us where did you saw such dynamic size scroll bars?
By default all the scrollable common controls use the built-in window scroll bars which are parts of window non-client area. These scroll bars are not the scroll bar windows. It’s not possible to re-paint the non-client area based scroll bars via handling the WM_NCPAINT standard message. Windows often draws the non-client window scroll bars without sending this message. But, the CExtNCSB template class skins these scroll bars. It simply creates the horizontal and vertical CExtScrollBar windows on the top of the non-client area window which requires the scroll bar skinning. The CExtNCSB template class synchronizes the scrolling parameters of the CExtScrollBar windows with the scrolling parameters of the non-client area scroll bars. That’s why the scroll bar skinning is possible with Prof-UIS. We can make the CExtScrollBar windows on the top of your list control smaller. But we cannot make the list control’s non-client area scroll bars smaller because this will damage the non-client area parts of list control like borders.
The task you requested can be implemented with controls written from scratch like Prof-UIS grid controls.

Eric guez Jul 27, 2010 - 10:24 AM

I’ve not seen this anywhere.

I was using my iphone, and iphone UI never shows srollbars until you scroll.

I dont think this behaviour is good (since I always need a scroll indicator to evaluate my list size and the actual scroll position).
But resizing scrollbar while not using it may be a good idea.

Eric guez Jul 27, 2010 - 10:26 AM
Technical Support Jul 28, 2010 - 5:59 AM

The article referred in your message demonstrates the scroll bar usage similar to that implemented by the CExtNCSB template class in Prof-UIS. But its author just implemented support for custom scroll bar width. This can be acceptable for the CListBox common control where all the items are just a strings organized into the simple column. Besides, the implementation of the custom width scroll bar looks like incompatible with list box items containing long text. This approach is not acceptable for the most of other controls. The scroll bar with large width will cover items of the CListCtrl control. I.e. the non client area of the CListCtrl control should be recomputed and its themed borders will be damaged. This means the variable size scroll bars can be implemented only with windows written from scratch. We can assume your question is a feature request for coding our list view control.