Thanks to all for the advice. I've tried all the suggestions but I still have the same problem. The cursor changes to the hand correctly when I hover over the datagrid. If I move the mouse off the datagrid in any direction except upwards, the cursor changes back to what it should be. If I move the mouse to any spot above the datagrid, the cursor stays as a hand and stays that way no matter where I move the mouse. It's as if the mouseLeave event never happens for mouse movement in the upward direction from the datagrid.
While on the subject, can anyone recommend a good source for cursor icons (preferably free!)? Thanks, Pete Molly's Revenge <http://www.mollysrevenge.com> On Sun, Jul 31, 2011 at 8:27 AM, Peter Brigham MD <pmb...@gmail.com> wrote: > And it's much better not to lock the cursor and then change it. Locked > cursors have a way of sticking if the handler to unlock the cursor somehow > misses. instead, don't lock anything, just set the defaultcursor to hand, > then set it to empty when done. I usually have this in my stack script: > > on mousemove > put the target into tTarg > if the name of the target contains "button" then > if the tool contains "browse" then > set the defaultcursor to hand > end if > else > set the defaultcursor to empty > end if > pass mouseMove > end mousemove > > on mouseLeave > set the defaultcursor to empty > pass mouseLeave > end mouseLeave > > > -- Peter > > Peter M. Brigham > pmb...@gmail.com > http://home.comcast.net/~pmbrig > > > On Jul 30, 2011, at 8:17 PM, Jeff Massung wrote: > > > I never do mouse cursor changes in controls. I do all of them in the > card. > > > > on mouseMove px,py > > if px,py is within the rect of ... then > > -- cursor A > > else if px,py is within the rect of ... then > > -- cursor B > > else > > -- put the cursor back to normal > > end if > > end mouseMove > > > > This makes it *much* easier to control what's shown when. > > > > Jeff M. > > > > On Sat, Jul 30, 2011 at 1:58 PM, Pete <p...@mollysrevenge.com> wrote: > > > >> Thanks Jeff. I'm trying to implement the cursor change and running into > >> some weirdness. > >> > >> In the script of the datagrid, I have these two handlers: > >> > >> *on* mouseEnter > >> > >> *lock* cursor > >> > >> *set* the cursor to hand > >> > >> *end* mouseEnter > >> > >> > >> *on* mouseLeave > >> > >> *unlock* cursor > >> > >> *end* mouseLeave > >> > >> > >> This changes the cursor as expected and most of the time, it returns to > the > >> correct cursor when I move the mouse away from the datagrid. However, > if I > >> move the cursor above the datagrid, the cursor stays as the hand and > does > >> not return to any other image no matter where I move the mouse to. > >> > >> > >> This is the first time I've attempted to control the cursor so no doubt > I'm > >> doing something wrong! > >> > >> > >> Pete > >> Molly's Revenge <http://www.mollysrevenge.com> > >> > >> > >> > >> > >> On Sat, Jul 30, 2011 at 11:48 AM, Jeff Massung <mass...@gmail.com> > wrote: > >> > >>> For dragging, I'd go with "handles" on the left side of the datagrid > that > >>> have hand icon when you hover over them. They've become pretty > ubiquitous > >>> on > >>> webpages. For an example of what I mean: > >>> > >>> http://jqueryui.com/demos/sortable/ > >>> > >>> As for a context menu, you be okay with just a tool-tip. People > generally > >>> try and right-click a lot for things they expect to be there. > Otherwise, > >>> again, go with something common to show that actions are available. For > >>> example, and disclosure triangle on the far right of a UI widget is > >>> typically clickable and will bring up a menu. Left-click will bring up > >> your > >>> context menu, and r-click anywhere will bring it up as well. > >>> > >>> Jeff M. > >>> > >>> On Sat, Jul 30, 2011 at 12:42 PM, Pete <p...@mollysrevenge.com> wrote: > >>> > >>>> Wondering if anyone has any thoughts on a couple of user interface > >>>> questions. > >>>> > >>>> I'm providing a popup contextual menu when the user right-clicks on a > >>>> datagrid. I'm also providing the ability to re-order rows in a > >> datagrid > >>> by > >>>> dragging and dropping them. The common thread between these two > >>> functions > >>>> is that there is no on-screen indication that they exist. Popup menus > >>> are > >>>> invisible until they are invoked and drag and drop is equally > invisible > >>>> until someone initiates it. > >>>> > >>>> Are there any common methods for indicating to users that features > like > >>>> this > >>>> are available to them? > >>>> > >>>> Pete > >>>> Molly's Revenge <http://www.mollysrevenge.com> > >>>> _______________________________________________ > >>>> use-livecode mailing list > >>>> use-livecode@lists.runrev.com > >>>> Please visit this url to subscribe, unsubscribe and manage your > >>>> subscription preferences: > >>>> http://lists.runrev.com/mailman/listinfo/use-livecode > >>>> > >>> _______________________________________________ > >>> use-livecode mailing list > >>> use-livecode@lists.runrev.com > >>> Please visit this url to subscribe, unsubscribe and manage your > >>> subscription preferences: > >>> http://lists.runrev.com/mailman/listinfo/use-livecode > >>> > >>> > >> _______________________________________________ > >> use-livecode mailing list > >> use-livecode@lists.runrev.com > >> Please visit this url to subscribe, unsubscribe and manage your > >> subscription preferences: > >> http://lists.runrev.com/mailman/listinfo/use-livecode > >> > > _______________________________________________ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode