1

I'm trying to modify the editable-list widget so that each entry has two slots, one for an account name, the second for an amount. Here's a mock-up of what I'm after visually (made with GIMP):

Edited picture

I'm able to create a group widget which is close:

 (defvar playground-group) (make-local-variable 'playground-group) (setq playground-group (widget-convert 'group (widget-convert 'editable-field :format "%v" :size 50) (widget-convert 'item :value "" :format " %v ") (widget-convert 'editable-field :format "%v" :size 5))) (defvar playground-posting) (make-local-variable 'playground-posting) (setq playground-posting (widget-create playground-group)) 

However, it's not clear to me how I could replace the editable-field within an editable-list with the posting widget. I've read through the manual a few times and I'm not sure what's needed. Short of looking through the source for the editable-list widget, any advice for next steps?

1 Answer 1

1

Documentation for the editable-list widget says: TYPE ::= (editable-list [KEYWORD ARGUMENT]... TYPE)

So I think you want to create an editable-list widget whose type is a group widget, so you can group two editable-field widgets.

Documentation for the group widget says: TYPE ::= (group [KEYWORD ARGUMENT]... TYPE...)

That would look like this:

(widget-create '(editable-list (group :format "%v" (editable-field :format "%v " :size 50) (editable-field :format "%v\n" :size 5)))) 

Note that you don't really need all those calls to widget-convert.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.