On Wednesday, May 20, 2015 at 9:59:53 PM UTC-7, Chong wrote: > > Thanks again Eric, I don't quite understand how that works, but it does. > The only problems are that it's hard to see where the actual text lies > while you're editing, and that the button is the entire block of text, so > when there's a lot of text it'll be quite a big button. >
> For the record I've gotten rid of the $t$ argument for the "b" macro, and > modified the rest to this: > Without using $t$ as the text for the button, how do you even *see* the button, since it uses class="tc-btn-invisible" so that there is no button border or fill and only the text is shown. In terms of "how it works"": The <<b>> macro uses the technique described in the RevealWidget documentation on how to create a "slider" button. The number param that you pass to it is used to construct the name of a "state tracking" tiddler that starts with "$:/state/" so that it is hidden from normal view (i.e., it won't appear in the sidebar, except in the "more>system" tab). If the state tiddler does not contain the text "show" (or the tiddler doesn't exist), then the <<b>> macro outputs a button that creates the tiddler and sets the text to "show". However, if the state tiddler already exists and contains "show", then the <<b>> macro output the a button that deletes the state tiddler. Thus, <<b 1>> creates a single button that *toggles* the existence (and content) of $:/state/1. Then, by writing <$reveal type="match" text="show" state="$:/state/1"> your content goes here </$reveal> you can use the <<b 1>> button to toggle the display of that content. As you can see from the example I provided, you can nest the <$reveal>...</$reveal> as many levels deep as you need, as long as each has it's own corresponding $:/state/N tiddler and a button to toggle it. Hope this explanation helps, enjoy, -e Eric Shulman ELS Design Studios TiddlyTools - "Small Tools for Big Ideas!" InsideTiddlyWiki: The Missing Manuals YOUR DONATIONS ARE VERY IMPORTANT! HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"... http://TiddlyTools.github.com/fundraising.html#MakeADonation Professional TiddlyWiki Consulting Services... Analysis, Design, and Custom Solutions: http://www.TiddlyTools.com/#Contact -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c3a98ecd-a3f5-478e-b6f4-d216ec3eb094%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

