In an Fl_Browser, the horizontal scrollbar can be moved to the top of the widget. The puzzler is this feature is driven by the align() value of scrollbar , not hscrollbar !
I.e. modifying test/browser.cxx as follows results in a horizontal scrollbar at the top:
browser = new Fl_Select_Browser(0, 0, window.w(), 350, 0);
browser->type(FL_MULTI_BROWSER); //original
browser->has_scrollbar(Fl_Browser_::BOTH_ALWAYS); // add this to force horizontal scrollbar
browser->scrollbar.align(FL_ALIGN_TOP); // moves horizontal scrollbar to the top
browser->callback(b_cb); // original
In Fl_Browser_.cxx are the following lines:
78 if (hscrollbar.visible()) {
79 H -= scrollsize;
80 if (scrollbar.align() & FL_ALIGN_TOP) Y += scrollsize;
81 }
If this is a supported feature, it seems to me line 80 should read:
80 if (hscrollbar.align() & FL_ALIGN_TOP) Y += scrollsize;
although making this change may be a backwards compatibility issue.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
[ Direct Link to Message ] |