Difference between revisions of "Command/setupfield"

From Wiki
Jump to navigation Jump to search
(remove manual syntax)
Line 6: Line 6:
 
== [[Help:Reference|Syntax]] (autogenerated) ==
 
== [[Help:Reference|Syntax]] (autogenerated) ==
 
<syntax>setupfield</syntax>
 
<syntax>setupfield</syntax>
== [[Help:Reference|Syntax]] ==
 
<table cellspacing="4" cellpadding="2" class="cmd">
 
  <tr>
 
    <td colspan="2" class="cmd">\setupfield<span class="first" >[...]</span><span class="second" >[...,...,...]</span><span class="third" >[...,...=...,...]</span><span class="first" >[...,...=...,...]</span><span class="second" >[...,...=...,...]</span></td>
 
  </tr>
 
  <tr valign="top" class="first">
 
    <td class="cmd">[...]</td>
 
    <td>name </td>
 
  </tr>
 
  <tr valign="top" class="second">
 
    <td class="cmd">[...,...,...]</td>
 
    <td>label horizontal vertical frame </td>
 
  </tr>
 
  <tr valign="top" class="third">
 
    <td class="cmd">[...,...=...,...]</td>
 
    <td>see [[Command/setupfields|\setupfields]] </td>
 
  </tr>
 
</table>
 
  
  
Line 30: Line 12:
  
 
# setup name
 
# setup name
# ?
+
# keyword options
# options, mostly inherited from {{cmd|setupframed}}
+
# field options, mostly inherited from {{cmd|setupframed}}
 +
# field label options, inherited from {{cmd|setupframed}}
 +
# field content options, inherited from {{cmd|setupframed}}
  
 
== Example ==
 
== Example ==
  
 
<texcode>
 
<texcode>
\usemodule[fields] % MkIV
 
 
\setupfield[shortString][reset,horizontal][width=45mm,option=printable,frame=off,bottomframe=on,height=2em,offset=0.5mm,frameoffset=1mm]
 
\setupfield[shortString][reset,horizontal][width=45mm,option=printable,frame=off,bottomframe=on,height=2em,offset=0.5mm,frameoffset=1mm]
 
\definefield[Name][line][shortString][][Hans]
 
\definefield[Name][line][shortString][][Hans]

Revision as of 10:08, 20 February 2022

\setupfield

Syntax (autogenerated)

\setupfield[...][...,...][...=...,...][...=...,...][...=...,...]
[...]name
[...,...]reset label frame horizontal vertical
...=...,...inherits from \setupfieldtotalframed
...=...,...inherits from \setupfieldlabelframed
...=...,...inherits from \setupfieldcontentframed



Description

Define a setup class for interactive fields (widgets).

  1. setup name
  2. keyword options
  3. field options, mostly inherited from \setupframed
  4. field label options, inherited from \setupframed
  5. field content options, inherited from \setupframed

Example

\setupfield[shortString][reset,horizontal][width=45mm,option=printable,frame=off,bottomframe=on,height=2em,offset=0.5mm,frameoffset=1mm]
\definefield[Name][line][shortString][][Hans]
\field[Name]

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: