[haiku-development] Re: BScrollView and layouts

  • From: Brian Hill <brianh@xxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 18 Jan 2017 06:32:54 -0500


On Jan 17, 2017, at 10:20 AM, Adrien Destugues <pulkomandy@xxxxxxxxxxxxx> 
wrote:

On Tue, Jan 17, 2017 at 06:51:45AM -0500, Brian Hill wrote:
Does the BScrollView class work with a target view that uses a layout?  

From your attempt, it seems not.
This class is much less useful when you use layouts, anyway. It is quite
easy to build a BScrollBar manually, put it next to your view in a group
or grid layout, and make it send its scrolling messages to its target
view.
I found the place I had missed where it was still being added to the window’s 
layout, so the group view now is properly added as the scrollview target.  
However now the scrollbar thinks the view is way larger than it actually is and 
shows a tiny draggable bar when in fact the entire view is shown.  And moving 
the draggable bar makes the view draw outside what should be the frame of the 
scroll view and covers over the small “Notification Center” header view at the 
top. So I will have to work on that.


This also allows you to control the scrolling more precisely, as the
default behavior (scroll by 1 pixel at a time) isn't particularly useful
anyway.
Hmm can you explain, I am not sure what you mean.

-Brian

Other related posts: