comparison man/widget.texi @ 89961:3fd4a5c21153

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-29 Merge from lorentey@elte.hu--2004/emacs--multi-tty--0, emacs--cvs-trunk--0 Patches applied: * lorentey@elte.hu--2004/emacs--multi-tty--0--patch-224 Added sorted-doc to backup regex in lib-src. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-479 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-482 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-483 Build-in-place tweak * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-484 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-485 Update from CVS
author Miles Bader <miles@gnu.org>
date Tue, 10 Aug 2004 07:46:40 +0000
parents 4c90ffeb71c5 e546c74f795e
children cb67264d6096
comparison
equal deleted inserted replaced
89960:d79ab6afded5 89961:3fd4a5c21153
211 For example, capitalizing all text from the middle of one field to the 211 For example, capitalizing all text from the middle of one field to the
212 middle of another field is prohibited. 212 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.
227 232
228 @deffn Face widget-field-face 233 @deffn Face widget-field-face
343 (erase-buffer)) 348 (erase-buffer))
344 (remove-overlays) 349 (remove-overlays)
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"
351 :value "This" 357 :value "This"
352 :help-echo "Choose me, please!" 358 :help-echo "Choose me, please!"