Re: FXScrollWindow

[email protected] Mon, 13 Nov 2023 21:10:54 +0000
Newsgroups gmane.comp.lib.fox-toolkit.user
Message-ID <[email protected]>
On 2023-11-13 20:41, John Selverian wrote:
> I added VSCROLLING_OFF up the chain but it still does not scroll
> when over the treelist, it still works when over the checkboxes.
> I can scroll horizontally when over the treelist.
> 
> 	_checkBox_SW = new FXScrollWindow(splitter_left_VF_0,
> HSCROLLING_OFF | LAYOUT_FILL);
> 	FXHorizontalFrame* HF_SW = new
> FXHorizontalFrame(_checkBox_SW, LAYOUT_FILL | FRAME_SUNKEN |
> VSCROLLING_OFF);
> 	_checkBoxes_VF_0 = new FXVerticalFrame(HF_SW,
> LAYOUT_FILL_Y | VSCROLLING_OFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
> 	_treeList_TL = new FXTreeList(HF_SW, this, ID_TREE_LIST,
> LAYOUT_FILL | TREELIST_SINGLESELECT | VSCROLLING_OFF);


In current development branch (post feb '22), the wheel
event is passed to either vertical or horizontal scrollbar,
depening on which direction is scrollable.

If neither direction is scrollable, the wheel event is
not handled. (return code=0).

In older versions, wheel events were passed to vertical
scrollbar, unconditionally.  This means (in your situation),
that the FXScrollWindow does not see the wheel event because
the FXTreeList's vertical scrollbar always consumes it, even
if its not vertically scrollable.

Benefit of the new method is that a scrollable widget benefits
from wheel scrolling, even if it only scrolls horizontally.

And if you've disabled scrolling, then a parent of the widget
can possibly get a shot at consuming the wheel event.

Most of the time, scrolling is not disabled; less often, the
horizontal scrolling is disabled (e.g. when wrapping text in
FXText, there is no horizontal scrolling possible).

If vertical scrolling is disabled but horizontal scrolling isn't,
then the wheel could still be useful.



        -- JVZ