ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Radiobuttons again...
@ 2022-06-25 13:55 Henning Hraban Ramm via ntg-context
  0 siblings, 0 replies; only message in thread
From: Henning Hraban Ramm via ntg-context @ 2022-06-25 13:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm

Hi Hans,

I know you hate form widgets, but I found a clue what might be wrong 
with radiobuttons.

While we can’t fix the behaviour of viewers, ConTeXt’s radiobuttons 
misbehave if they don’t have a custom symbol (that OTOH is not shown in 
many viewers).

If I don’t use a custom symbol in \definesubfield, all subfields are 
activated together, which is clearly wrong.

I hope that’s an easy fix.

Hraban

"""
\setupinteraction[state=start]
\setuppaper[a6,landscape]

\setupfield[CGradio][frame=off, height=1em, width=1em]

\definefield[CGjoin][radio][CGradio][CGPerson,CGCompany][CGPerson]
\definesubfield[CGPerson][][] % doesn’t work
\definesubfield[CGCompany][][]

\definefield[CGjoinA][radio][CGradio][CGPersonA,CGCompanyA][CGPersonA]
\definesubfield[CGPersonA][][x,-] % works, but ugly
\definesubfield[CGCompanyA][][x,-]

\starttext

I’d like to join CG as a \field[CGPerson]\ person / \field[CGCompany]\ 
company.

I’d like to join CG as a \field[CGPersonA]\ person / \field[CGCompanyA]\ 
company.

\stoptext
"""
___________________________________________________________________________________
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] only message in thread

only message in thread, other threads:[~2022-06-25 13:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-25 13:55 Radiobuttons again Henning Hraban Ramm 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).