Re: FXTreeList scrolling

"John Selverian" <[email protected]> Fri, 11 Oct 2024 10:48:11 -0400
Newsgroups gmane.comp.lib.fox-toolkit.user
Organization JAHM Software
Message-ID <[email protected]>
Here is my layout...I don't think I'm handling the SEL_MOUSEWHEEL
message anywhere...


	FXVerticalFrame* vertical = new FXVerticalFrame(this,
LAYOUT_FILL);
	FXHorizontalFrame* HF_0 = new FXHorizontalFrame(vertical,
LAYOUT_FILL);

	_leftRightSplitter = new FXSplitter(vertical, this,
ID_PLOT_SPLITTER, SPLITTER_HORIZONTAL | SPLITTER_TRACKING |
LAYOUT_FILL);

	FXVerticalFrame* splitter_left_VF_0 = new
FXVerticalFrame(_leftRightSplitter, LAYOUT_FILL | FRAME_LINE, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0);
	FXVerticalFrame* splitter_right_VF_0 = new
FXVerticalFrame(_leftRightSplitter, LAYOUT_FILL | FRAME_NONE, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0);

	_checkBox_SW = new FXScrollWindow(splitter_left_VF_0,
HSCROLLING_OFF | LAYOUT_FILL);
	FXHorizontalFrame* HF_SW = new
FXHorizontalFrame(_checkBox_SW, LAYOUT_FILL | FRAME_NONE);
	_checkBoxes_VF_0 = new FXVerticalFrame(HF_SW,
LAYOUT_FILL_Y, 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 |
HSCROLLING_OFF);
	// VSCROLLING_OFF | HSCROLLING_OFF has no effect, both of
these lines have the same behavior
 	//_treeList_TL = new FXTreeList(HF_SW, this,
ID_TREE_LIST, LAYOUT_FILL | TREELIST_SINGLESELECT);




-----Original Message-----
From: Jeroen van der Zijp <[email protected]> 
Sent: Friday, October 11, 2024 10:10 AM
To: John Selverian <[email protected]>
Cc: [email protected]
Subject: Re: [Foxgui-users] FXTreeList scrolling

On Thu, 10 Oct 2024 16:13:42 -0400
"John Selverian" <[email protected]> wrote:

>I have a FXScrollWindow with a FXHorizontalFrame. The first
child is a 
>FXVerticalFrame contains a bunch of FXCheckButton and the second
child 
>is a FXTreeList. The FXTreeList is always fully expanded so the
items 
>match up with the check boxes.
>
> 
>
>The problem I have is in scrolling. When I hover the mouse over
the 
>checkboxes of over the scrollbar I can scroll with the mouse.
>However, when the mouse is over the treelist the scrolling does
not 
>work.
>
> 
>
>I tried disabling scrolling in the treelist, thinking it would
pass it 
>up the chain, but it does not work. Then I tried to catch the 
>SEL_MOUSEWHEEL event for the treelist and handle it there but I
can't 
>capture the SEL_MOUSEWHEEL event from the treelist.
>
> 
>
>Any ideas?

Generally, mouse evens are delivered to the widget under the
cursor, unless some other widget has "grabbed" the mouse.  

If you're wheeling over things that don't handle the
SEL_MOUSEWHEEL events, then those SEL_MOUSEWHEEL events should be
handled by that window's parents [and so on, until we're reached
the top].

Now, if the FXCheckButton widget itself doesn't handle the mouse
wheel, then its baseclass FXWindow will pass it to its target.

So then the question becomes if the FXCheckButton's target
handler class somehow handles a SEL_MOUSEWHEEL message with the
source ID equal to the FXCheckButton's message ID.

Make sure nothing accidentally handles that!


  -- JVZ





-- 
+----------------------------------------------------------------
------------+
| Copyright (C) 14:00 11/25/2023 Jeroen van der Zijp.   All
Rights Reserved. |
+----------------------------------------------------------------
------------+