Tinderbox Forum

Can I reverse an OnVisit action?

(Jawn Lam) #1

Suppose I have this setup:

My intention is to have the font size of the outline view enlarge to a readable size when I select the note but then revert back to “100” when I move on to another note.

Is this possible?

(eastgate) #2

That’s an interesting idea! But there’s no action for OnLeave or OnDepature, so this isn’t trivial.

If other notes in your outline all had OnVisit actions that set the outline text size, then you’d have the effect you’re looking for. You could set a “standard” OnVisit action in a prototype, or even in the default value of OnVisit.

Multiple selections are going to be a problem, but perhaps that’s not a concern for your task.

(Jawn Lam) #3

Brilliant!!! OnVisit & prevSibling/nextSibling for the win!

(Jawn Lam) #4

I just implemented this:


And I absolutely love it!!! Thanks for the help, @eastgate.

(Andreas Grimm) #5

looks interesting @jawnlam … However, I tried it myself to no avail. Could you kindly post a working TBX showcasing the scenario. Thanks in advance

(Jawn Lam) #7

Sample of using OnVisit for reading.tbx (176.9 KB)
@andreas, sorry for the delayed response.

If the upload to this post does not work, you can find my sample file via this DropBox link: