eugene.litvinov Posted July 25, 2011 Posted July 25, 2011 I use next layout: <scrollbox name="Source::ProgressDialog::scroller" export="1" align="overlap" pos_x="16" pos_y="94" width="722" height="340"> <gridbox name="Source::ProgressDialog::questList" export="1" align="left" columns="3" space_x="6" space_y="16"> <vbox width="220" height="44"> <icon align="overlap,background" texture="source/textures/gui/quest_icons/beginning.png"/> <label align="center"> <text rich="1"/> </label> </vbox> </gridbox> </scrollbox> I need, that component scrollbox, when it appears, can get mouse wheel events, this works, when we click on scrollbox area, and then we can use mouse wheel to scroll content in it. How can I set this focus via script, when I show this gui? I try to use: scroller.setFocus() and questList.setFocus(), but mouse wheel don't work until we click on it. What I'm doing wrong? Thanks.
manguste Posted July 27, 2011 Posted July 27, 2011 Mouse wheel scrolling with setFocus() for scrollboxes is working completely fine for us. For example see the attachment. Check whether any other of your functions clear mouse wheel states. scrollbox.cpp scrollbox.world
eugene.litvinov Posted July 29, 2011 Author Posted July 29, 2011 Thanks, your example is worked, but when I add it to my project, the situation the same: scrollbox focus sets only after mouse click on it... will be research...
Recommended Posts