* Interactive checkbox in ConTeXt
@ 2022-05-20 10:01 Jan-Erik Hägglöf via ntg-context
2022-05-20 10:28 ` Henning Hraban Ramm via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Jan-Erik Hägglöf via ntg-context @ 2022-05-20 10:01 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Jan-Erik Hägglöf
[-- Attachment #1.1: Type: text/plain, Size: 355 bytes --]
HI!
How do I accomplish a similar funktion like this, that is written in latex, but in context instead?
LATEXCODE
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\begin{Form}
\CheckBox[name=mycheckbox,checkboxsymbol=\ding{53}]{This is a check box:}
\end{Form}
\end{document}
Thanks in advance
Jan-Erik
[-- Attachment #1.2: Type: text/html, Size: 9773 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Interactive checkbox in ConTeXt
2022-05-20 10:01 Interactive checkbox in ConTeXt Jan-Erik Hägglöf via ntg-context
@ 2022-05-20 10:28 ` Henning Hraban Ramm via ntg-context
2022-05-22 8:47 ` Jan-Erik Hägglöf via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-05-20 10:28 UTC (permalink / raw)
To: ntg-context; +Cc: Henning Hraban Ramm
Am 20.05.22 um 12:01 schrieb Jan-Erik Hägglöf via ntg-context:
> How do I accomplish a similar funktion like this, that is written in
> latex, but in context instead?
>
> LATEXCODE
>
> |\documentclass{article} \usepackage{hyperref} \begin{document}
> \begin{Form} \CheckBox[name=mycheckbox,checkboxsymbol=\ding{53}]{This is
> a check box:} \end{Form} \end{document}|
Have a look at https://wiki.contextgarden.net/Widgets and the "mwidget"
manual.
Custom symbols work unreliably, depending of the viewer.
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Interactive checkbox in ConTeXt
2022-05-20 10:28 ` Henning Hraban Ramm via ntg-context
@ 2022-05-22 8:47 ` Jan-Erik Hägglöf via ntg-context
2022-05-22 10:27 ` Jan-Erik Hägglöf via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Jan-Erik Hägglöf via ntg-context @ 2022-05-22 8:47 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Jan-Erik Hägglöf
Thank you for the useful tip.
I’ve tested the example given below but ran into missing figure, maybe I need to reconstruct the MetaPost file as mentioned in setup. Se attached example:
Thanks in advance!
/Jan-Erik
\setupinteraction[state=start]
\setupexternalfigures[location=global]
\definesymbol [yes] [{\externalfigure[mp-cont.502]}]
\definesymbol [no] []
\setupfield
[setup 3]
[width=2cm, height=2cm,
rulethickness=3pt, corner=round, framecolor=red]
\definefield [check-me] [check] [setup 3] [yes,no] [no]
\starttext
\field[check-me]
\stoptext
> 20 maj 2022 kl. 12:28 skrev Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl>:
>
> Am 20.05.22 um 12:01 schrieb Jan-Erik Hägglöf via ntg-context:
>> How do I accomplish a similar funktion like this, that is written in latex, but in context instead?
>> LATEXCODE
>> |\documentclass{article} \usepackage{hyperref} \begin{document} \begin{Form} \CheckBox[name=mycheckbox,checkboxsymbol=\ding{53}]{This is a check box:} \end{Form} \end{document}|
>
> Have a look at https://wiki.contextgarden.net/Widgets and the "mwidget" manual.
>
> Custom symbols work unreliably, depending of the viewer.
>
> Hraban
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Interactive checkbox in ConTeXt
2022-05-22 8:47 ` Jan-Erik Hägglöf via ntg-context
@ 2022-05-22 10:27 ` Jan-Erik Hägglöf via ntg-context
0 siblings, 0 replies; 4+ messages in thread
From: Jan-Erik Hägglöf via ntg-context @ 2022-05-22 10:27 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Jan-Erik Hägglöf
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
So far I accomplished this but problem is that when I check it checks all, not individually.
\setupinteraction[state=start]
\setupexternalfigures[location=global]
\definesymbol [yes] [{\externalfigure[check-mark-svgrepo-com.svg][conversion=mp]}]
\definesymbol [no] []
\setupfield
[setup 3]
[width=0.5cm, height=0.5cm,
rulethickness=1pt, corner=round, framecolor=red]
\definefield [check-me] [check] [setup 3] [yes,no] [no]
\define\chk{\field[check-me]}
\starttext
\chk gfgkfgfghjl
\chk dfdffdfff
\stoptext
[-- Attachment #2: check-mark-svgrepo-com.svg --]
[-- Type: image/svg+xml, Size: 1415 bytes --]
[-- Attachment #3: Type: text/plain, Size: 1894 bytes --]
> 22 maj 2022 kl. 10:47 skrev Jan-Erik Hägglöf <skrantajanneman@gmail.com>:
>
> Thank you for the useful tip.
>
> I’ve tested the example given below but ran into missing figure, maybe I need to reconstruct the MetaPost file as mentioned in setup. Se attached example:
>
> Thanks in advance!
>
> /Jan-Erik
>
> \setupinteraction[state=start]
> \setupexternalfigures[location=global]
>
> \definesymbol [yes] [{\externalfigure[mp-cont.502]}]
> \definesymbol [no] []
>
>
> \setupfield
> [setup 3]
> [width=2cm, height=2cm,
> rulethickness=3pt, corner=round, framecolor=red]
>
> \definefield [check-me] [check] [setup 3] [yes,no] [no]
>
> \starttext
> \field[check-me]
> \stoptext
>
>> 20 maj 2022 kl. 12:28 skrev Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl>:
>>
>> Am 20.05.22 um 12:01 schrieb Jan-Erik Hägglöf via ntg-context:
>>> How do I accomplish a similar funktion like this, that is written in latex, but in context instead?
>>> LATEXCODE
>>> |\documentclass{article} \usepackage{hyperref} \begin{document} \begin{Form} \CheckBox[name=mycheckbox,checkboxsymbol=\ding{53}]{This is a check box:} \end{Form} \end{document}|
>>
>> Have a look at https://wiki.contextgarden.net/Widgets and the "mwidget" manual.
>>
>> Custom symbols work unreliably, depending of the viewer.
>>
>> Hraban
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>>
>> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___________________________________________________________________________________
>
[-- Attachment #4: Type: text/plain, Size: 493 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-22 10:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20 10:01 Interactive checkbox in ConTeXt Jan-Erik Hägglöf via ntg-context
2022-05-20 10:28 ` Henning Hraban Ramm via ntg-context
2022-05-22 8:47 ` Jan-Erik Hägglöf via ntg-context
2022-05-22 10:27 ` Jan-Erik Hägglöf via ntg-context
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).