3 Replies Latest reply on Mar 11, 2010 1:05 PM by Steve Wright

    Changing the appearance of a field when hovering



      Changing the appearance of a field when hovering


      I have a field that is a button with a script which opens a new window.  Is there a way to change the appearance of the filed (i.e. underline, different color) when the hand hovers it?


      Carolyn Haywood



      FMP 10 Advanced Mac 10.6.2

        • 1. Re: Changing the appearance of a field when hovering
          Steve Wright

          Not as far as I am aware anyway...


          The only way I have found to do such a thing (and it was quite a while since I tried) was more of a hack than anything, it required a script trigger plugin and was not effective enough to use for a deployed solution, but it did kind of work.


          What I did was to use the tooltip of an object to trigger a script, passing the object name as a script parameter.

          The script would then set a variable and refresh the screen.


          The conditional formatting of the object would look at the variable to decide whether to highlite or not.


          However... this poses a problem when moving away from that button or field, there is no way to un-highlite it without having the rest of your layout clear the variable using a similar method...


          Of course, if somebody does have a technique which works reliably, then Im interested too....


          • 2. Re: Changing the appearance of a field when hovering

            FM doesn't support mouse-over events natively. When you think about it that seems strange because when FM displays a tooltip it's in effect performing a mouse-over event. It doesn't seem like a stretch to allow the developer access to the function. I like SWS's work around . . . if only there was an equally graceful way of un-formatting after the hand or cursor leaves the object. As well, tooltips seem to take time to activate . . . at least the first one. Perhaps that's adjustable and I've never noticed.


            • 3. Re: Changing the appearance of a field when hovering
              Steve Wright

              I know this is kind of 'off topic' here, but I thought I would mention it anyway...


              I use a similar approach to activate a portal, when moving the mouse over it...On a layout with multiple portals, it becomes a pain to have to click in each one (and miss a field)  before the mouse wheel works properly.


              Using the tooltip & a script trigger plugin, I basically trigger a script to go to the portal object in question, meaning each portal become active just by hovering over it... There is a small delay on the first one (like you say) but overall, its what my users wanted... so its what they got.