hello,
i try to have a panel that shows up on mouse hover and hide once the mouse got away
i keep a bit of the panel appearing on the left of the screen so one can access it
so far i use this code
[java]
effect
onStartHover name=“move” mode=“toOffset” direction=“left” length=“100” startDelay=“0” inherit=“true” offsetX=“300” offsetY=“0” onEndEffect=“panelShow()”/
onEndHover name=“move” mode=“toOffset” direction=“left” length=“100” startDelay=“0” inherit=“true” offsetX="-300" offsetY=“0” onEndEffect=“panelHide()”/
/effect
[/java]
and i use callbacks to keep the panel in place
[java]
public void panelHide()
{
Element panel=screen.findElementByName(“panel”);
panel.setConstraintX(new SizeValue("-300px"));
panel.getParent().layoutElements();
}
public void PanelShow()
{
Element panel=screen.findElementByName("panel");
panel.setConstraintX(new SizeValue("0px"));
panel.getParent().layoutElements();
}
[/java]
so it works
but as the effect ends up,
1 - the panel goes back in original position instead of staying at offset
2 - then it goes where it is supposed to be via the callbacks results
so it flickers before appearing at offset
i dont know how to manage this
if i use neverStopRendering=“true”, the panel will stay in place, but forever, discarding the onEndHover situation
so it will never hide once i move the mouse away
is there any way to remove the neverStopRendering=“true” after the panel is set into place ?
i can’t think of anything else so far
thx