ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Widgets color option not working with Mark IV
@ 2011-01-26  0:49 Reviczky, Adam
  2011-01-26  9:45 ` Hans Hagen
  2011-01-26 10:21 ` Hans Hagen
  0 siblings, 2 replies; 12+ messages in thread
From: Reviczky, Adam @ 2011-01-26  0:49 UTC (permalink / raw)
  To: ntg-context

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

Hi,

I was playing a bit more with the field style properties and found out that if the font size is always different it works, but as soon as it has a size that was used before it defaults back to normal.

Here's the minimal example:

% begin of example
\starttext

\setupfields
[label,frame,horizontal]
[offset=4pt,height=fit,framecolor=green,background=screen,backgroundscreen=.80]
[height=40pt,width=100pt,align=middle,background=screen,backgroundscreen=.90,frame=off]
[height=40pt,width=100pt,color=red,align=right,style=type,background=screen,backgroundscreen=.90,frame=off]

\setupfield
[sizea]
[horizontal]
[style={\switchtobodyfont[20pt]}]

\setupfield
[sizeb]
[horizontal]
[style={\switchtobodyfont[28pt]}]

\setupfield
[sizec]
[horizontal]
[style={\switchtobodyfont[20pt]}]

\definefield [Emaila] [line] [sizea] [] [pragma@wxs.nl]
\definefield [Emailb] [line] [sizeb] [] [pragma@wxs.nl]
\definefield [Emailc] [line] [sizec] [] [pragma@wxs.nl]

\field [Emaila] [your email]
\par
\field [Emailb] [your email]
\par
\field [Emailc] [your email]

\stoptext
% end of example

(field of Emaila has fontsize 20pt as defined, field of Emailb has fontsize 28pt as defined, but field of Emailc defaults back to normal 12pt? size instead of the defined 20pt. See attached pdf.)

As for the color option, I couldn't figure out why it's not working at all. Some hints appreciated.

Best wishes,
Adam

[-- Attachment #2: widgets.pdf --]
[-- Type: application/pdf, Size: 6318 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 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] 12+ messages in thread
* Widgets color option not working with Mark IV
@ 2011-01-26 13:58 Reviczky, Adam
  2011-01-27 17:07 ` Hans Hagen
  0 siblings, 1 reply; 12+ messages in thread
From: Reviczky, Adam @ 2011-01-26 13:58 UTC (permalink / raw)
  To: ntg-context

>>it was not yet implemented (passing the info was, but not adding it to 
>>the pdf stream)
>>
>>i uploaded a new beta

Thanks, color and fontsize works perfectly now!

Could you also have a look at whats going on with the alignment to the first field?

And since we're at it, I can't get the field+javascript working with mkiv, is that suppose to work?
All I want to do is the accented glyphs in a text field, aka:
\setupfield
[TextSetup][...][...][...]
[....,
regionin=JS(Initialize_TeX_Key),
afterkey=JS(Convert_TeX_Key),
validate=JS(Convert_TeX_String)]

Works with mkii, but has no effect with mkiv.

Thanks again,
Adam
___________________________________________________________________________________
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] 12+ messages in thread
* Widgets color option not working with Mark IV
@ 2010-12-07 12:59 Reviczky, Adam
  0 siblings, 0 replies; 12+ messages in thread
From: Reviczky, Adam @ 2010-12-07 12:59 UTC (permalink / raw)
  To: ntg-context

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

Hi

The color option in setupfield for widgets is ignored and always gives me black text with Mark IV (see: MarkIV.pdf compiled with a recent ConTeXt minimals).
The attached example (widgets.tex) with Mark II however makes the correct color, in this case red, as you can see in (MarkII.pdf) compiled on live.contextgarden.net (aka with Mark II).

The macro in question is:
---
\setupfield
[ShortLine]
[label,frame,horizontal]
[offset=4pt,height=fit,framecolor=green,background=screen,backgroundscreen=.80]
[height=18pt,width=80pt,align=middle,background=screen,backgroundscreen=.90,frame=off]
% color=name does not work with MARK IV
[height=18pt,width=80pt,color=red,align=right,style=type,background=screen,backgroundscreen=.90,frame=off]
---


On the same subject, is it possible in any way to make a custom style for the entry form text? The style option of setupfield just allows: "normal bold slanted boldslanted type", but I would like to change the size of the text-entry to eg. tfb or tfc. (By giving size commands to the style option the first form entry changes to that size but it reverts on the subsequent entries to the normal size.)

Regards
Adam

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: widgets.tex --]
[-- Type: text/x-tex; name="widgets.tex", Size: 457 bytes --]

\setupinteraction[state=start]

\starttext
\setupfield
[ShortLine]
[label,frame,horizontal]
[offset=4pt,height=fit,framecolor=green,background=screen,backgroundscreen=.80]
[height=18pt,width=80pt,align=middle,background=screen,backgroundscreen=.90,frame=off]
[height=18pt,width=80pt,color=red,align=right,style=type,background=screen,backgroundscreen=.90,frame=off]
\definefield[Email][line][ShortLine][][pragma@wxs.nl]
\field[Email][your email]
\stoptext


[-- Attachment #3: MarkII.pdf --]
[-- Type: application/pdf, Size: 23850 bytes --]

[-- Attachment #4: MarkIV.pdf --]
[-- Type: application/pdf, Size: 5999 bytes --]

[-- Attachment #5: Type: text/plain, Size: 486 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] 12+ messages in thread

end of thread, other threads:[~2011-01-31  1:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26  0:49 Widgets color option not working with Mark IV Reviczky, Adam
2011-01-26  9:45 ` Hans Hagen
2011-01-26 10:21 ` Hans Hagen
  -- strict thread matches above, loose matches on Subject: below --
2011-01-26 13:58 Reviczky, Adam
2011-01-27 17:07 ` Hans Hagen
2011-01-27 21:42   ` Reviczky, Adam
2011-01-29  5:09   ` Reviczky, Adam
2011-01-29  9:42     ` Hans Hagen
2011-01-30  0:28       ` Reviczky, Adam
2011-01-30 12:48         ` Hans Hagen
2011-01-31  1:16           ` Reviczky, Adam
2010-12-07 12:59 Reviczky, Adam

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