ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* minimal button width
@ 2003-09-27 13:17 Peter Rolf
  2003-09-27 13:44 ` Patrick Gundlach
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Rolf @ 2003-09-27 13:17 UTC (permalink / raw)


I want some small empty buttons with exact dimensions. Is there a way to do
this with \button or must I use fields (ughh) instead?



% interface=en output=pdftex
%
\setupinteraction[state=start]
\setupcolors[state=start]


\starttext

\setupbuttons[strut=no, offset=overlay, framecolor=green, empty=yes]

The minimum width of a button depends on the actual bodyfont size.
I'm sure that there are good reasons for it.
\blank[big]

\switchtobodyfont[20pt]
But I want smaller {\bf empty} \textreference[test]{test}buttons!
\button[width=25mm, height=2.5mm]{Please, print me!}[test]
\button[width=2.5mm, height=25mm]{Not this time!}[test]
\blank[big]

\switchtobodyfont[40pt]
Help at 40pt...
\button[width=25mm, height=2.5mm]{Now?}[test]
\button[width=2.5mm, height=25mm]{Nope!}[test]

\stoptext



Regards,

    Peter

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

* Re: minimal button width
  2003-09-27 13:17 minimal button width Peter Rolf
@ 2003-09-27 13:44 ` Patrick Gundlach
  2003-09-28 11:09   ` Peter Rolf
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Gundlach @ 2003-09-27 13:44 UTC (permalink / raw)


Peter Rolf <peter.rolf@arcor.de> writes:

> I want some small empty buttons with exact dimensions. Is there a way to do
> this with \button or must I use fields (ughh) instead?

Hello Peter,

with your code + 

\button[width=2.5mm, height=2.5mm]{Please, print me!}[test]
\button[width=2.5mm, height=2.5mm]{Not this time!}[test]

I get two empty square buttons which look about 2.5 mm wide and high. I
could send you a screenshot or the resulting pdf file.

I tried the ConTeXt version 2003.9.24. But maybe I don't understand
your question.

Patrick
-- 
You are your own rainbow!

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

* Re: Re: minimal button width
  2003-09-27 13:44 ` Patrick Gundlach
@ 2003-09-28 11:09   ` Peter Rolf
  2003-09-28 11:29     ` Patrick Gundlach
  2003-09-29  8:20     ` Hans Hagen
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Rolf @ 2003-09-28 11:09 UTC (permalink / raw)


Patrick Gundlach wrote:

>Hello Peter,
>
>with your code + 
>
>\button[width=2.5mm, height=2.5mm]{Please, print me!}[test]
>\button[width=2.5mm, height=2.5mm]{Not this time!}[test]
>
one value should be 25mm for a better example

>I get two empty square buttons which look about 2.5 mm wide and high. I
>could send you a screenshot or the resulting pdf file.
>
>I tried the ConTeXt version 2003.9.24. But maybe I don't understand
>your question.
>
>Patrick
>  
>
Just press the buttons (not releasing the left  mouse button) and you 
will see...

Greetings,

    Peter

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

* Re: minimal button width
  2003-09-28 11:09   ` Peter Rolf
@ 2003-09-28 11:29     ` Patrick Gundlach
  2003-09-28 13:35       ` Peter Rolf
  2003-09-29  8:20     ` Hans Hagen
  1 sibling, 1 reply; 8+ messages in thread
From: Patrick Gundlach @ 2003-09-28 11:29 UTC (permalink / raw)


Peter Rolf <peter.rolf@arcor.de> writes:

> Just press the buttons (not releasing the left  mouse button) and you
> will see...

Just to confirm: in normal state I see a small button. When pressing
the mouse button I see the area of the button inverted but with more
width than actually used, but the height looks fine.

+---+            xxxxxxx+---+xxxxxxxx
|   |  becomes   xxxxxxx|xxx|xxxxxxxx
+---+            xxxxxxx+---+xxxxxxxx

where xx is inverted. But this happens (in your example) only with
the 2.5 mm width. The 25 mm wide button is OK.

Patrick

--
You are your own rainbow!

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

* Re: Re: minimal button width
  2003-09-28 11:29     ` Patrick Gundlach
@ 2003-09-28 13:35       ` Peter Rolf
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Rolf @ 2003-09-28 13:35 UTC (permalink / raw)


Patrick Gundlach wrote:

>Just to confirm: in normal state I see a small button. When pressing
>the mouse button I see the area of the button inverted but with more
>width than actually used, but the height looks fine.
>
>+---+            xxxxxxx+---+xxxxxxxx
>|   |  becomes   xxxxxxx|xxx|xxxxxxxx
>+---+            xxxxxxx+---+xxxxxxxx
>
confirmation granted; nice ascii example!
What you see is not only the inverted but the whole size of the button. 
You can activate this button
in this visible area (and that's my problem).

>
>where xx is inverted. But this happens (in your example) only with
>the 2.5 mm width. The 25 mm wide button is OK.
>
>  
>
Yep! The 2.5mm wide button is smaller than the minimum given through the 
actual font size,
while the 25mm wide button is not. If I for example use 
\switchtobodyfont[5pt] in front of
the button definition, I can get a 2.5mm wide button.
Sorry for irritating you, but the function of a button is not to rule a 
frame. ;-)

Regards,

    Peter

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

* Re: Re: minimal button width
  2003-09-28 11:09   ` Peter Rolf
  2003-09-28 11:29     ` Patrick Gundlach
@ 2003-09-29  8:20     ` Hans Hagen
  2003-09-29 10:13       ` Peter Rolf
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2003-09-29  8:20 UTC (permalink / raw)


At 13:09 28/09/2003 +0200, you wrote:
>Patrick Gundlach wrote:
>
>>Hello Peter,
>>
>>with your code +
>>\button[width=2.5mm, height=2.5mm]{Please, print me!}[test]
>>\button[width=2.5mm, height=2.5mm]{Not this time!}[test]
>one value should be 25mm for a better example
>
>>I get two empty square buttons which look about 2.5 mm wide and high. I
>>could send you a screenshot or the resulting pdf file.
>>
>>I tried the ConTeXt version 2003.9.24. But maybe I don't understand
>>your question.
>>
>>Patrick
>>
>Just press the buttons (not releasing the left  mouse button) and you will 
>see...

\starttext

\setupinteraction[state=start]

\button[width=25mm, height=25mm]{Please, print me!}[firstpage]
\button[width=25mm, height=25mm]{Not this time!}[firstpage]

\stoptext

works ok here

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: Re: minimal button width
  2003-09-29  8:20     ` Hans Hagen
@ 2003-09-29 10:13       ` Peter Rolf
  2003-09-30 13:13         ` Peter Rolf
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Rolf @ 2003-09-29 10:13 UTC (permalink / raw)


Hans Hagen wrote:

....

> \starttext
>
> \setupinteraction[state=start]
>
> \button[width=25mm, height=25mm]{Please, print me!}[firstpage]
> \button[width=25mm, height=25mm]{Not this time!}[firstpage]
>
> \stoptext
>
> works ok here
>
Works ok here too. But this was not my example :)


% interface=en output=pdftex
%
\setupinteraction[state=start]
\setupcolors[state=start]

\starttext
\setupbuttons[strut=no, offset=overlay, framecolor=green, empty=yes]

The minimum width of a button depends on the actual bodyfont size.
I'm sure that there are good reasons for it.
\blank[big]

\switchtobodyfont[20pt]
But I want smaller {\bf empty} \textreference[test]{test}buttons!
\button[width=25mm, height=2.5mm]{Please, print me!}[test]
\button[width=2.5mm, height=25mm]{Not this time!}[test]
\blank[big]

\switchtobodyfont[40pt]
Help at 40pt...
\button[width=25mm, height=2.5mm]{Now?}[test]
\button[width=2.5mm, height=25mm]{Nope!}[test]

\stoptext


Regards,

    Peter

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

* Re: Re: minimal button width
  2003-09-29 10:13       ` Peter Rolf
@ 2003-09-30 13:13         ` Peter Rolf
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Rolf @ 2003-09-30 13:13 UTC (permalink / raw)


Hans Hagen wrote:

> This is what i get here ...
>
It seems you haven't followed the discussion with Patrick. You are the 
second one,
who has trouble to understand my problem. I'll try to be more precise in 
the future. :)

It's not the size of the printed part (frame). My problem is the 
activation area
(this is what I mean with size) of the button. For the default font (12pt)
the minimal wide of an *empty* button is about 4.15mm, if you use bigger 
fonts
this value increases. Just push the buttons (not releasing the left 
mouse button)
in my example and you see what I mean.

Regards,

   Peter

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

end of thread, other threads:[~2003-09-30 13:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-27 13:17 minimal button width Peter Rolf
2003-09-27 13:44 ` Patrick Gundlach
2003-09-28 11:09   ` Peter Rolf
2003-09-28 11:29     ` Patrick Gundlach
2003-09-28 13:35       ` Peter Rolf
2003-09-29  8:20     ` Hans Hagen
2003-09-29 10:13       ` Peter Rolf
2003-09-30 13:13         ` Peter Rolf

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