Michael
Michael

Reputation: 1251

gwt HorizontalSplitPanel: catch split position event

I use a HorizonSplitPanel in gwt and wonder if there is no possibility to get an event, if the split position is changed. I need the event to later manually change the positions of some absolute positioned elements.

Is there a possibility to get an event for the change of the split position? Or does somebody know a work-around?

Best, Michael

Upvotes: 0

Views: 354

Answers (1)

Arcadien
Arcadien

Reputation: 2278

You may sink mouseup/mousedown event on the splitPanel, and check split position at each mouse release. If it has changed since last time, then fire a custom event.

You also may override newer SplitLayoutPanel with your own Splitter implementation which sends a custom event on resize, since event handing is implemented in abstract Splitter class.

Upvotes: 1

Related Questions