Fl_Tree misses horizontal scrollbar

15 views
Skip to first unread message

Edzard Egberts

unread,
Mar 21, 2018, 4:11:15 AM3/21/18
to 'ed' via fltk.general
I'm using a Fl_Tree with FLTK 1.3.4 (release, not a snapshot) and got
the problem, that the horizontal scrollbar doesn't show up.

There is a protected hscrollbar, but there doesn't seem to be a method
to access it. There are some scrollbar methods like hposition(int pos)
or is_hscroll_visible(), but no "hscroll_set_visible()" or something
like that. Is there a solution I don't see?

Also the documentation doesn't seem to be up to date, because there are
no methods calc_dimensions() or calc_tree(), just a recalc_tree(), but
that doesn't cause the hscrollbar to show up.

Greg Ercolano

unread,
Mar 21, 2018, 10:53:59 AM3/21/18
to fltkg...@googlegroups.com
On 03/21/18 01:10, Edzard Egberts wrote:
> I'm using a Fl_Tree with FLTK 1.3.4 (release, not a snapshot) and got
> the problem, that the horizontal scrollbar doesn't show up.

Try taking a copy of 1.4.. it should all be working in there.
If it works and you don't want to move to 1.4, you can probably
just take the Fl_Tree* files from 1.4 and move it to 1.3.4.

For sure horiz scroll works in 1.4 (attached screenshot of
examples/tree-custom-draw-items)
tree-hscroll.png

Edzard Egberts

unread,
Mar 21, 2018, 11:51:15 AM3/21/18
to 'ed' via fltk.general
Greg Ercolano wrote:
> On 03/21/18 01:10, Edzard Egberts wrote:
>> I'm using a Fl_Tree with FLTK 1.3.4 (release, not a snapshot) and got
>> the problem, that the horizontal scrollbar doesn't show up.
>
> Try taking a copy of 1.4.. it should all be working in there.

But misses all my patches. ;o(

> If it works and you don't want to move to 1.4, you can probably
> just take the Fl_Tree* files from 1.4 and move it to 1.3.4.

That doesn't work "»Fl_System_Driver« has not been declared".

> For sure horiz scroll works in 1.4

Fl_Tree was in early state when released for 1.3? Anyway it showed up,
that I will use Fl_Tree only for the current test program, so the
problem vanished. Sorry for bothering. ;o)

Greg Ercolano

unread,
Mar 21, 2018, 12:18:26 PM3/21/18
to fltkg...@googlegroups.com
On 03/21/18 08:50, Edzard Egberts wrote:
> Greg Ercolano wrote:
>> On 03/21/18 01:10, Edzard Egberts wrote:
>>> I'm using a Fl_Tree with FLTK 1.3.4 (release, not a snapshot) and got
>>> the problem, that the horizontal scrollbar doesn't show up.
>>
>> Try taking a copy of 1.4.. it should all be working in there.
>
> But misses all my patches. ;o(
>
>> If it works and you don't want to move to 1.4, you can probably
>> just take the Fl_Tree* files from 1.4 and move it to 1.3.4.
>
> That doesn't work "»Fl_System_Driver« has not been declared".

Oh, hmm.. must be something Manolo had to add
when implementing the driver model. There's probably
something in Fl_Tree that had platform specific stuff,
though I can't remember what it is.

>> For sure horiz scroll works in 1.4
>
> Fl_Tree was in early state when released for 1.3?

Yes, Fl_Tree is relatively young; it's one of the
more recent widgets added.

A lot was added in Fl_Tree during the 1.3 release, IIRC.

Which is why there's heavy use of FL_ABI_VERSION in
that code; many features being developed broke ABI,
so needed that flag to enable them.

So be sure you have the FL_ABI_VERSION macro set to 10304
and rebuild all of FLTK.

> Anyway it showed up,
> that I will use Fl_Tree only for the current test program, so the
> problem vanished. Sorry for bothering. ;o)

Perhaps when the problem vanished, it was due to a recompile
after changing the ABI macros. I'd advise using 10304 in the
FL/abi_version.h

Edzard Egberts

unread,
Mar 22, 2018, 2:53:31 AM3/22/18
to 'ed' via fltk.general
No, it vanished, because I don't need the Fl_Tree any more and for the
test a wide window worked for me.
Reply all
Reply to author
Forward
0 new messages