Missing scroll bars in 2nd window

Hi. I’m working on a video editor for Haiku, and have 2 methods of displaying control views. Option #1 uses SDI interface where a control view is embedded into main window (shares window with other controls and timeline), and option #2 where the user can split any control panel into it’s own window (MDI). From the source point of view, a ControlView is a child of BView, and can be attached either to MainWindow (when embedded and shared) or to a ControlWindow (entire window for itself). A new instance exists for each window, so you can both options as well.

The problem I have is that scroll bars are only visible on the 1st instance I create (inside the embedded window). I do not see visible scroll bars when the view is created and attached to the 2nd window. It’s the same class in both instances, with the only difference a bool to toggle whether to display the spawn window button.

Has anyone encountered a similar issue. The windows have the same control flags, as does the view. See screenshot (2nd post below, Web+ hiding attachment button with popup)

2 Likes

I don’t know what your problem is caused by, but what I can see of it looks really good.

Please work on it, it looks like something I would use a lot for my home videos.

1 Like

Check if the scroll bars are displayed then the window is smaler the the widgets on it.

Hard to guess without sourcecode.

Are you using layout API? Did you make sure you do not use the legacy (with BRect) constructor for some of your views? Are your scrollbars part of a BScrollView or are they standalone BScrollBars?

My guess would be (but it’s just a guess):

  • You create a window the same size as your view
  • You create a BScrollView and add your view to it. The BScrollView is larger than the original view to make space for the scrollbars
  • You add the BScrollView to the window. It resizes when the window resizes. As a result the scrolbars are always hidden just outside the window border

You could try Archive()ing the window and then dumping the BMessage with PrintToStream. It could give you some hinsights about the structure of your window, view sizes and hierarchy, etc.