From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: buttons
Date: Fri, 15 Feb 2002 23:53:20 +0100 [thread overview]
Message-ID: <5.1.0.14.1.20020215234857.031099f0@server-1> (raw)
In-Reply-To: <5.1.0.14.2.20020215134217.00b24d90@correo.um.es>
At 01:42 PM 2/15/2002 +0100, you wrote:
>Content-Type: text/plain; charset="iso-8859-1"; format=flowed
>X-MIME-Autoconverted: from 8bit to quoted-printable by unimur.um.es id
>NAA11587
>
>Hello,
>
>I send you a small file that tests widget forms: when you enter in the
>rectangle of a button, then a text is shown. This is done by using the /E
>and /X keys. I would like the same but with images: when you enter in the
>button region, then a image displays.
>
>My problem is that I can't produce a button with an icon (image) in it. Is
>that possible with pdftex?
In order to do this with buttons, you need to create the resources (an x
object will do)' in context this is implemented as follows:
% output=pdftex
\setupinteraction
[state=start]
\setupcolors
[state=start]
\setuppapersize
[S3][S3]
\setupbodyfont
[17.3pt]
\setuplayout
[width=middle,
header=0pt,
footer=0pt,
width=middle]
\defineframedtext
[sample]
[background=color,
backgroundcolor=darkgray,
width=4cm,
height=4cm,
align={middle,lohi}]
\definesymbol[N-ONE] [\sample {\red Some Kind Of Image}]
\definesymbol[N-TWO] [\sample {\green Some Kind Of Image}]
\definesymbol[N-THREE][\sample {\blue Some Kind Of Image}]
\definesymbol[Y-ONE] [\sample {\cyan Some Kind Of Image}]
\definesymbol[Y-TWO] [\sample {\magenta Some Kind Of Image}]
\definesymbol[Y-THREE][\sample {\yellow Some Kind Of Image}]
\definefield
[test] [check] []
[{N-ONE,N-TWO,N-THREE},{Y-ONE,Y-TWO,Y-THREE}]
\starttext \field[test] \stoptext
the field commands work together will the context symbosl mechanism; and
symbols can be anything (graphics included);
The up/down etc modes are supported by the commalists.
BTW, there is a roll over buttn feature in context but not yet in the
public distribution,
Hans
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
fall-back web server:
www.pragma-pod.nl
-------------------------------------------------------------------------
next parent reply other threads:[~2002-02-15 22:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5.1.0.14.2.20020215134217.00b24d90@correo.um.es>
2002-02-15 22:53 ` Hans Hagen [this message]
2002-01-22 10:08 Buttons Patrick Gundlach
2002-01-22 10:18 ` Buttons Hans Hagen
2002-01-27 18:31 ` Buttons Hans Hagen
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=5.1.0.14.1.20020215234857.031099f0@server-1 \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/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).