ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Henning Hraban Ramm <texml@fiee.net>
Subject: Radiobuttons again...
Date: Sat, 25 Jun 2022 15:55:47 +0200	[thread overview]
Message-ID: <62d5fa36-f87a-4ae2-e942-9e53f56bd2cd@fiee.net> (raw)

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
___________________________________________________________________________________

                 reply	other threads:[~2022-06-25 13:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62d5fa36-f87a-4ae2-e942-9e53f56bd2cd@fiee.net \
    --to=ntg-context@ntg.nl \
    --cc=texml@fiee.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).