From 8dbc532e462f384899acfa1f17d687a2fdef6400 Mon Sep 17 00:00:00 2001 From: Lars Hansen Date: Thu, 5 Aug 2004 06:19:38 +0000 Subject: [PATCH] Update how to separate the editable field of an editable-field widget from other widgets. (Programming Example): Add text after field. --- man/ChangeLog | 6 ++++++ 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 @@ +2004-08-05 Lars Hansen + + * widget.texi (User Interface): Update how to separate the + editable field of an editable-field widget from other widgets. + (Programming Example): Add text after field. + 2004-07-24 Richard M. Stallman * 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. Editable text fields are created by the @code{editable-field} widget. -An editable field must be surrounded by static text on both sides, that -is, text that does not change in the lifetime of the widget. If the -field extends to the end of the line, the terminating line-feed character -will count as the necessary static text on that end, but you will have -to provide the static text before the field yourself. The -@code{:format} keyword is useful for generating the static text; for -instance, if you give it a value of @code{"Name: %v"}, the "Name: " part -will count as the static text. +@strong{Warning:} In an @code{editable-field} widget, the editable +field must not be adjacent to another widget---that won't work. +You must put some text in between. Either make this text part of +the @code{editable-field} widget itself, or insert it with +@code{widget-insert}. + +The @code{:format} keyword is useful for generating the necessary +text; for instance, if you give it a value of @code{"Name: %v "}, +the @samp{Name: } part will provide the necessary separating text +before the field and the trailing space will provide the +separating text after the field. If you don't include the +@code{:size} keyword, the field will extend to the end of the +line, and the terminating newline will provide separation after. The editing text fields are highlighted with the @code{widget-field-face} face, making them easy to find. @@ -345,6 +350,7 @@ Interface}). (widget-insert "Here is some documentation.\n\nName: ") (widget-create 'editable-field :size 13 + :format "%v " ; Text after the field! "My Name") (widget-create 'menu-choice :tag "Choose"