9
$\begingroup$

Ideally, I'd like to change the mouse pointer appearance(s) at notebook level, from a styleseet. However, I'd be satisfied only by changing its color. This is the main issue keepeing me away from dark themes: the pointer becomes hard to find.

There seems to be an option "MousePointerAppearance" but I don't know how/if it works.

$\endgroup$
12
  • $\begingroup$ where do you see this option? $\endgroup$
    – acl
    Commented Jul 17, 2014 at 14:22
  • $\begingroup$ @acl in the option inspector under Editing options, v10 $\endgroup$
    – Rojo
    Commented Jul 17, 2014 at 14:42
  • 1
    $\begingroup$ This almost gets there, but the mouse style resets if you click or move away from the notebook. FrontEndExecute[FrontEnd`SetMouseAppearance[Graphics@{Red, Text@"x"}]] $\endgroup$
    – mfvonh
    Commented Jul 17, 2014 at 16:19
  • $\begingroup$ @mfvonh nice attempt $\endgroup$
    – Rojo
    Commented Jul 17, 2014 at 16:55
  • $\begingroup$ Try singing a nice song $\endgroup$ Commented Jul 18, 2014 at 0:29

1 Answer 1

5
$\begingroup$

A little improvement according to mfvonh's idea:

SetOptions[InputNotebook[], Background -> GrayLevel[0]]
SetOptions[
           InputNotebook[],
           NotebookEventActions -> {
                   "MouseClicked" :> 
                          FrontEndExecute[ FrontEnd`SetMouseAppearance[
                                     Dynamic@Style["\[Earth]", "Graphics", 30, Hue[Clock[]]]
                                                                      ]],
                   PassEventsDown -> True
                                   }
          ]

Sadly "MouseEntered" or "MouseOver" are both not working here.

$\endgroup$
5
  • $\begingroup$ Nice idea Silvia, +1. However, the Graphics background seems to be non-transparent if I put the notebook background black $\endgroup$
    – Rojo
    Commented Sep 23, 2014 at 23:34
  • $\begingroup$ @Rojo Try my new improvement please :) $\endgroup$
    – Silvia
    Commented Sep 24, 2014 at 13:50
  • $\begingroup$ Nice icon, it feels like I am about to shoot at the code. It can be seen in any background :P (even in this SetOptions[InputNotebook[], Background -> Dynamic@Hue@Clock[]]). $\endgroup$
    – Rojo
    Commented Sep 24, 2014 at 14:05
  • $\begingroup$ Strange, when I just change to "LinkHand" it switches when I move cursor out of the window, but yours pointer keeps it's value. $\endgroup$
    – Kuba
    Commented Mar 27, 2015 at 11:30
  • $\begingroup$ @Kuba Have you tried moving the cursor fast enough so it won't trig the "cross window boarder" event? $\endgroup$
    – Silvia
    Commented Apr 2, 2015 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.