Cursor does not change when moving mouse over controls.

  • Hi all,

    I have a Dashboard widget plugin, whose initWithWebView look like this:

    tokenField = [[[NSTokenField alloc] initWithFrame:NSMakeRect(20,
    [webView bounds].size.height - 42, [webView bounds].size.width - 40,
    22)] autorelease];
    [tokenField setHidden:YES];
    [webView addSubview:tokenField];

    and in case of showBack, [tokenField setHidden:NO] called to show
    tokenField and allow user to configure the widget.

    It works almost perfect... but I have a normal html hyperlink on the
    back side of the widget too, when mouse cursor move over it, the
    cursor should look as a hand, and when the cursor move over the
    tokenField, it should become "I"-shape. However, I have to click the
    token field and have the cursor changed, also, I have to click
    somewhere on the widget other than the token field, so when I move the
    mouse cursor over the hyperlink, it became a hand. So I don't know
    what cause the problem, and how to solve it. Anyone here please help
    me, thank you.
  • Hi Wang,

    AppKiDo, an excellent, open source documentation browser for Cocoa, has an
    example of how to do this.

    http://homepage.mac.com/aglee/downloads/appkido.html

    HTH,
    Joel

    Wang Chun wrote:

    >
    > Hi all,
    >
    > I have a Dashboard widget plugin, whose initWithWebView look like this:
    >
    > tokenField = [[[NSTokenField alloc] initWithFrame:NSMakeRect(20,
    > [webView bounds].size.height - 42, [webView bounds].size.width - 40,
    > 22)] autorelease];
    > [tokenField setHidden:YES];
    > [webView addSubview:tokenField];
    >
    > and in case of showBack, [tokenField setHidden:NO] called to show
    > tokenField and allow user to configure the widget.
    >
    > It works almost perfect... but I have a normal html hyperlink on the
    > back side of the widget too, when mouse cursor move over it, the
    > cursor should look as a hand, and when the cursor move over the
    > tokenField, it should become "I"-shape. However, I have to click the
    > token field and have the cursor changed, also, I have to click
    > somewhere on the widget other than the token field, so when I move the
    > mouse cursor over the hyperlink, it became a hand. So I don't know
    > what cause the problem, and how to solve it. Anyone here please help
    > me, thank you.
    >

    __________________________________________________
    Do You Yahoo!?
    Tired of spam?  Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today