Syrya,

A Quick example, use on tiddlywiki.com and explore how this works, one 
button allows another button to be toggled.

<$button set="!!edit-fields-list" setTo="" class="tc-btn-invisible" 
 tooltip="Create edit-fields-list and customise which fields to display for 
edit in view mode"><$action-setfield 
show-edit-fields="yes"/>{{$:/core/images/edit-button}}{{$:/core/images/storyview-classic}}</$button>


<$reveal type="match" state="!!show-edit-fields" text="yes"><$button 
set="!!show-edit-fields" setTo="no" class="tc-btn-invisible" tooltip="close 
edit fields 
view">{{$:/core/images/preview-closed}}{{$:/core/images/storyview-classic}}</$button></$reveal>
<$reveal type="match" state="!!show-edit-fields" text="no"><$button 
set="!!show-edit-fields" setTo="yes" class="tc-btn-invisible" 
 tooltip="open edit fields 
view">{{$:/core/images/preview-open}}{{$:/core/images/storyview-classic}}</$button></$reveal>


The first allows you to create the show-edit-fields. if this field exists 
the second button(s) (one at a time displayed but made up of two buttons) 
provides the ability to toggle the value yes/no.

Regards
Tony

On Thursday, October 10, 2019 at 11:41:30 AM UTC+11, Surya wrote:
>
> Hi Tony,
>
> that sounds interesting!
> But I really don't know how to do , I mean how to write what you describe.
> And please believe me, I am searching for the codes and learn from them 
> and try to modify them and so on and so on.
> Doing that since 3 days รก 7 hours only for this one button. And the same 
> for many other wanted functions, sometimes even more time spending. And 
> knowing that somebody here possibly knows the code...
>
> Thanks for your help, Surya
>
>
> On Tuesday, October 8, 2019 at 10:31:26 AM UTC+2, TonyM wrote:
>>
>> A quick tip
>>
>> Create two buttons one mobile, one desktop in the same tiddler. set an 
>> initial value then display one when mobile selected hide it when desktop is 
>> enabled and visa versa for the other. Basically have a complex toggle.
>>
>> You can load each button with multiple actions.
>>
>> Forcing the initial value stops you having to deal with the first button 
>> press, ie before either is pressed.
>>
>> Remember you can search for the code for any existing button core or 
>> coming with a plugin that behaves similarly to what you want and learn from 
>> how its done, even clone and modify. 
>>
>> Regards
>> Tony
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8f1a58e7-7525-4527-938d-b44559258a7f%40googlegroups.com.

Reply via email to