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
Peter Rolf
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!
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
Peter Rolf
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!
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
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 -------------------------------------------------------------------------
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
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
participants (3)
-
Hans Hagen
-
Patrick Gundlach
-
Peter Rolf