Mohammad,

You need to create a two button system where one only shows if the other 
does not.

Actually I have being through a few repetitions to develop this method;

here is an example ripped from my current work.
\define ea-toggle()
<$list filter="[is[current]has[view-caption]">
{{!!view-caption}}
</$list>
<$list filter="[is[current]!edit-view-caption[yes]]">
<$button set="!!edit-view-caption" setTo="yes" class="tc-btn-invisible">
{{$:/core/images/edit-button}}
</$button>
</$list>
<$list filter="[is[current]edit-view-caption[yes]]">
{{||$:/PSaT/Viewer/edit-view-caption}}
<$button set="!!edit-view-caption" setTo="no" tooltip="save and set 
view-caption" class="tc-btn-invisible">
{{$:/core/images/done-button}}
</$button>
</$list>
\end


Notice how the filter to display each button is a simple negation of the 
other, and the !edit-view-caption[yes]]
Helps deal with the state field not existing in addition to the no state.

Of course you could use two checked and unchecked icons but the checkbox 
widget does that well.

I trick I found recently was to use a special character rather than an 
icon https://www.w3schools.com/charsets/ and allow the selected state to 
simply underline the character.
eg ☏ and *☏*

Regards
Tony

On Friday, 10 August 2018 16:51:29 UTC+10, Mohammad wrote:
>
> I want to use the checkbox widget for toggling a field on/off or true/false
>
> link: https://tiddlywiki.com/#CheckboxWidget
>
> How can I have a custom button (or custom graphics) instead of simple 
> checkbox icon?
>
> There is a macro developed by Mat: http://toggle.tiddlyspot.com/  can do 
> this but I want to do this with TW checkbox included in the core!
>
> Is there any solution to do that?
>
> Note I want to use it to simple toggle a field on/off! Standard button 
> cannot simply do that!
>
>
>
> *Mohammad*
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/613b7321-d090-4c2b-aa93-206b150ac3ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to