You have to set a hoverCallback. set hovercallback "jmolscript:set hoverlabel @{\"this is atom \" + _atomHovered}"
for example, displays "this is atom 3" when it is over that atom. You can also put anything in a Jmol script function and use that to define hoverlabel. The function is run after _atomHovered is set but before the hoverlabel is read, so you can, for example, use: function checkhover(); set hoverlabel @{"xyz="+{atomindex=_atomHovered}.xyz}; end function; set hovercallback "jmolscript:checkhover"; etc. etc. Bob 2009/3/30 Angel Herráez <angel.herr...@uah.es> > 11.6.18 and 11.7.28 > > The command > hover myText > applies to all atoms, not to the currently selected set. I was of course > expecting the latter. The documentation says nothing but that's the > behaviour for all commands. > > How can one set custom hovers? > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-users > -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
_______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users