Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Hiding the mouse cursor on forms

I've got an experiment being run on Windows 7/10 desktop touchscreens using the legacy backend (apparently necessary for resolution control), OS 3.2.5 with Python 2.7. Most of what participants are looking at is currently implemented as forms, and I'd like to keep the mouse cursor hidden for the entire experiment.

I've tried sticking all the different versions of ms.show_cursor(False) I've seen mentioned on the forums in relevant spots, editing the mouse initialization in _form.py file roughly as eduard suggested (https://forum.cogsci.nl/discussion/3344/form-text-input-mouse-cursor - slightly different now, since it looks like self.mouse.show_cursor() and self.mouse.hide_cursor() have changed to ms.show_cursor(True/False)), etc.

_form.py has been the closest to promising so far, but changing the initialization to include visible=False and adding ms.show_cursor(False)/ms.set_visible(False) on the following lines the best I've been able to achieve is a flickering cursor - as if something else involved in the display of forms (base and text_input) is redrawing it between my attempts to stamp it out. It seems to be hiding properly between forms. Any ideas for other places to check? Do we have some way I've missed of globally hiding the cursor for the duration of an experiment? Is it time to just give up, rip all the form objects out of this thing, and set them on fire?

Thanks for any ideas.

Comments

  • edited September 25

    I had the reversed problem and added this inline script as the very first item of my experiment. If you were to change True to False that might work. Don't forget to paste this to the run phase though.

    from openexp.mouse import mouse

    my_mouse = mouse(exp)
    my_mouse.show_cursor(show=True)

Sign In or Register to comment.