ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Widgets getting check marks instead of colors when the next one is clicked.
@ 2012-03-23 12:33 Mikael P. Sundqvist
  2012-03-23 18:50 ` Hans Hagen
  2012-03-23 18:54 ` Mikael P. Sundqvist
  0 siblings, 2 replies; 3+ messages in thread
From: Mikael P. Sundqvist @ 2012-03-23 12:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]

Dear list,

1) Look at the output of this simple document (attached as test.pdf).
If I click the first one I get a green square as I want. But when I
click the second one the first one loses its color and get a check
mark instead (tested on linux and windows). Is there anything I can do
to keep the green square when the red is clicked?

%%% BEGINNING OF FILE
\setupinteraction[state=start,color=darkblue]

\setupfield[setup 3]
        [width=1.2ex, height=1.2ex,
        rulethickness=1pt, framecolor=darkblue,offset=overlay]

\definesymbol [ryes]
[{\framed[frame=off,width=2em,height=2em,background=color,backgroundcolor=darkgreen]{
}}]
\definesymbol [rno] []
\definesymbol [wyes]
[{\framed[frame=off,width=2em,height=2em,background=color,backgroundcolor=darkred]{
}}]
\definesymbol [wno] []

\definefield [rcheckme][check] [setup 3] [ryes,rno] [rno]
\definefield [wcheckme][check] [setup 3] [wyes,wno] [wno]


\starttext
\field[rcheckme] Germany is a country in Europe.

\field[wcheckme] All germans are men.

\goto{Reset}[ResetForm]
\stoptext
%%% END OF FILE

2) In the example file above I also use ResetForm to clear all the
checks. Is there a way to get a button/link such that when I click it
all squares are "checked" (in my case colored red or green)?

Best regards, Mikael

PS If this method is outdated and there is a better one, please do not
hesitate to tell me.

[-- Attachment #2: test.pdf --]
[-- Type: application/pdf, Size: 10068 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Widgets getting check marks instead of colors when the next one is clicked.
  2012-03-23 12:33 Widgets getting check marks instead of colors when the next one is clicked Mikael P. Sundqvist
@ 2012-03-23 18:50 ` Hans Hagen
  2012-03-23 18:54 ` Mikael P. Sundqvist
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2012-03-23 18:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mikael P. Sundqvist

On 23-3-2012 13:33, Mikael P. Sundqvist wrote:
> Dear list,
>
> 1) Look at the output of this simple document (attached as test.pdf).
> If I click the first one I get a green square as I want. But when I
> click the second one the first one loses its color and get a check
> mark instead (tested on linux and windows). Is there anything I can do
> to keep the green square when the red is clicked?

There are some examples in the test suite.

In the latest acrobat check (and radio) rendering is a mess. The 
standard permits specific rendering and that has always worked ok. 
However, in currently interferes with acrobat pushing its own 
visualization on top. Some time ago took me days to figure out how / 
what went wrong and as a consequence I've removed some functionality 
simply because it is not rendered okay anyway. (It all has to do with 
generated appearance streams in the viewer, and I get the strong 
impression that there are no other apps out there that provide custom 
rendering.)

One way out is to disable the (by default enabled) highlighting of 
fields in the viewer (which I found out by coincidence). That can also 
be done by a javascript by loading the rhh file.

Hans




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Widgets getting check marks instead of colors when the next one is clicked.
  2012-03-23 12:33 Widgets getting check marks instead of colors when the next one is clicked Mikael P. Sundqvist
  2012-03-23 18:50 ` Hans Hagen
@ 2012-03-23 18:54 ` Mikael P. Sundqvist
  1 sibling, 0 replies; 3+ messages in thread
From: Mikael P. Sundqvist @ 2012-03-23 18:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Mar 23, 2012 at 1:33 PM, Mikael P. Sundqvist <mickep@gmail.com> wrote:
> Dear list,
>
> 1) Look at the output of this simple document (attached as test.pdf).
> If I click the first one I get a green square as I want. But when I
> click the second one the first one loses its color and get a check
> mark instead (tested on linux and windows). Is there anything I can do
> to keep the green square when the red is clicked?
>
> %%% BEGINNING OF FILE
> \setupinteraction[state=start,color=darkblue]
>
> \setupfield[setup 3]
>        [width=1.2ex, height=1.2ex,
>        rulethickness=1pt, framecolor=darkblue,offset=overlay]
>
> \definesymbol [ryes]
> [{\framed[frame=off,width=2em,height=2em,background=color,backgroundcolor=darkgreen]{
> }}]
> \definesymbol [rno] []
> \definesymbol [wyes]
> [{\framed[frame=off,width=2em,height=2em,background=color,backgroundcolor=darkred]{
> }}]
> \definesymbol [wno] []
>
> \definefield [rcheckme][check] [setup 3] [ryes,rno] [rno]
> \definefield [wcheckme][check] [setup 3] [wyes,wno] [wno]
>
>
> \starttext
> \field[rcheckme] Germany is a country in Europe.
>
> \field[wcheckme] All germans are men.
>
> \goto{Reset}[ResetForm]
> \stoptext
> %%% END OF FILE
>
> 2) In the example file above I also use ResetForm to clear all the
> checks. Is there a way to get a button/link such that when I click it
> all squares are "checked" (in my case colored red or green)?
>
> Best regards, Mikael
>
> PS If this method is outdated and there is a better one, please do not
> hesitate to tell me.

Hm, I now tried the file and the first problem is gone in acrobat
reader at home (linux, acrobat reader version 9.1.2). In other words,
the colors do stay here after checking other boxes. If I remember
correctly I had ver 9.2 at the linux machine at work. About the
version for Windows I do not remember.

Ah, I read Hans' (thanks!) reply as I type this and so it seems to be
a problem with later versions of Acrobat reader, which explains why it
works at home but not at work. Maybe I should simply come up with
another solutions to do these small tests for the students, as I
cannot be sure what version they are using...

Best regards, Mikael
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-23 18:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23 12:33 Widgets getting check marks instead of colors when the next one is clicked Mikael P. Sundqvist
2012-03-23 18:50 ` Hans Hagen
2012-03-23 18:54 ` Mikael P. Sundqvist

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).