diff options
| author | Lars Hansen | 2004-08-05 06:19:38 +0000 |
|---|---|---|
| committer | Lars Hansen | 2004-08-05 06:19:38 +0000 |
| commit | 8dbc532e462f384899acfa1f17d687a2fdef6400 (patch) | |
| tree | b2326ea42cd75716e6aa1ebb20b5819f010f03ea | |
| parent | 2d8a544976354b3787e4f28f2d97b3ab96f4a052 (diff) | |
| download | emacs-8dbc532e462f384899acfa1f17d687a2fdef6400.tar.gz emacs-8dbc532e462f384899acfa1f17d687a2fdef6400.zip | |
Update how to separate the editable field of an editable-field widget from other widgets.
(Programming Example): Add text after field.
| -rw-r--r-- | man/ChangeLog | 6 | ||||
| -rw-r--r-- | man/widget.texi | 22 |
2 files changed, 20 insertions, 8 deletions
diff --git a/man/ChangeLog b/man/ChangeLog index a36b0c75fe4..4f2ce160de6 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2004-08-05 Lars Hansen <larsh@math.ku.dk> | ||
| 2 | |||
| 3 | * widget.texi (User Interface): Update how to separate the | ||
| 4 | editable field of an editable-field widget from other widgets. | ||
| 5 | (Programming Example): Add text after field. | ||
| 6 | |||
| 1 | 2004-07-24 Richard M. Stallman <rms@gnu.org> | 7 | 2004-07-24 Richard M. Stallman <rms@gnu.org> |
| 2 | 8 | ||
| 3 | * text.texi (Paragraphs): Update how paragraphs are separated | 9 | * text.texi (Paragraphs): Update how paragraphs are separated |
diff --git a/man/widget.texi b/man/widget.texi index 457af8a07bb..7e1d920cc62 100644 --- a/man/widget.texi +++ b/man/widget.texi | |||
| @@ -213,14 +213,19 @@ middle of another field is prohibited. | |||
| 213 | 213 | ||
| 214 | Editable text fields are created by the @code{editable-field} widget. | 214 | Editable text fields are created by the @code{editable-field} widget. |
| 215 | 215 | ||
| 216 | An editable field must be surrounded by static text on both sides, that | 216 | @strong{Warning:} In an @code{editable-field} widget, the editable |
| 217 | is, text that does not change in the lifetime of the widget. If the | 217 | field must not be adjacent to another widget---that won't work. |
| 218 | field extends to the end of the line, the terminating line-feed character | 218 | You must put some text in between. Either make this text part of |
| 219 | will count as the necessary static text on that end, but you will have | 219 | the @code{editable-field} widget itself, or insert it with |
| 220 | to provide the static text before the field yourself. The | 220 | @code{widget-insert}. |
| 221 | @code{:format} keyword is useful for generating the static text; for | 221 | |
| 222 | instance, if you give it a value of @code{"Name: %v"}, the "Name: " part | 222 | The @code{:format} keyword is useful for generating the necessary |
| 223 | will count as the static text. | 223 | text; for instance, if you give it a value of @code{"Name: %v "}, |
| 224 | the @samp{Name: } part will provide the necessary separating text | ||
| 225 | before the field and the trailing space will provide the | ||
| 226 | separating text after the field. If you don't include the | ||
| 227 | @code{:size} keyword, the field will extend to the end of the | ||
| 228 | line, and the terminating newline will provide separation after. | ||
| 224 | 229 | ||
| 225 | The editing text fields are highlighted with the | 230 | The editing text fields are highlighted with the |
| 226 | @code{widget-field-face} face, making them easy to find. | 231 | @code{widget-field-face} face, making them easy to find. |
| @@ -345,6 +350,7 @@ Interface}). | |||
| 345 | (widget-insert "Here is some documentation.\n\nName: ") | 350 | (widget-insert "Here is some documentation.\n\nName: ") |
| 346 | (widget-create 'editable-field | 351 | (widget-create 'editable-field |
| 347 | :size 13 | 352 | :size 13 |
| 353 | :format "%v " ; Text after the field! | ||
| 348 | "My Name") | 354 | "My Name") |
| 349 | (widget-create 'menu-choice | 355 | (widget-create 'menu-choice |
| 350 | :tag "Choose" | 356 | :tag "Choose" |