[haiku-3rdparty-dev] Re: Attaching a BScrollBar to a BListView

  • From: Fredrik Modèen <fredrik@xxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Sun, 29 Nov 2009 11:32:46 +0100 (CET)

>
> On 2009-11-29 at 10:22:54 [+0100], Fredrik Modèen <fredrik@xxxxxxxxx>
> wrote:
>>
>> > Hi!
>> >
>> > As the title suggests, I cant seem to be able to attach a scoll bar to
>> > the list view. I have a list view defined called fEventList.
>> >
>> > I created a BScrollBar from an example I saw in the grok search:
>> > *fScrollBar = new BScrollBar(Bounds(), "MyScrollBar", fEventList, 0,
>> > 100,
>> > B_VERTICAL);
>> > *
>> > I put in fEventList as the target view. However, when I run the
>> > application,
>> > I dont see any scroll bar. Any reasons why this might be happening?
>> I guess you added the fScrollBar to the view or window and not
>> fEventList?
>
> You cannot add a ScrollBar to the view that the scrollbar is supposed to
> scroll. Just think about it! :-)
hehe I didn't read what he wrote :)


>
> In any case, for questions such as these, I would suggest to take any
> random Haiku application or preflet that has a list view with scroll bars,
> and just look at the code. The Sounds preflet seems like a good choice.
That's the easies way of learning :)

also you can use Tracker add-on TextSearch for finding what you're looking
for.
>
> Best regards,
> -Stephan
>
>


-- 
MVH
Fredrik Modèen


Other related posts: