如何编辑 ac# 列表框中的值
这更多的是一种关于如何让用户编辑列表框中的值的 UI 设计方法。
我对可用性问题感兴趣。
第一种方法是在列表附近有一个文本框。 当用户选择列表中的元素时,文本将转到文本框。
我的第二个方法是出现一个输入框(模式)并在那里编辑值。< /p>
另一个选项是使用列表视图并让用户内联编辑。如果用户不知道这是可编辑的(并非所有用户都知道),这可能会很棘手
。您更喜欢什么?关于不同方法有什么建议吗?
This is more of a UI Design approach on how to let the user edit values in a list box.
I am interested in the Usability issue.
First approach is having a textBox near the list.
When user selects an element in the list, the text goes to the textbox.My second though is having an input box coming up (a modal) and edit the value there.
Another option is to use a list view and let the user edit inline. This might be tricky if the user doesn't know this is editable (not all user do)
What would you prefer? Any suggestions on a different approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我使用数据绑定将文本框和数字控件绑定到列表框。当列表框选择发生更改时,相关数据将出现在控件中。
另一种方法是链接到列表框中当前所选项目的属性网格。这对于对属性网格相对熟悉的用户来说非常有效。
I have used data binding to bind text boxes and numeric controls to a listbox. As the list box selection is changed then the relevant data appears in the controls.
Another way is a property grid linked to the current selected item in the list box. That works well for users who may be relatively savvy for the property grid.
据我认为我会采用你的第二种方法。我想要一个编辑按钮。当我选择列表框中的任何项目时,应启用编辑按钮。当我单击“编辑”时,会出现一个小模式对话框,显示“确定”或“取消”,并在“文本框”中显示我可以编辑的当前值。
As far as I think I would go for your second approach. I would like an edit button. When I select any item in the list box, edit button should be enabled. When I click edit a small modal dialog saying
ok
orcancel
and intextbox
displaying the current value which I can edit.我认为列表视图看起来更干净,而且随着越来越多的网页使用客户端脚本、Ajax 等,人们越来越习惯这种事情。
我不喜欢模式弹出窗口的想法 - 非常笨重。
I think a list view looks a lot cleaner, and people are getting more used to this kind of thing as more web pages use client-side script, Ajax, etc.
I don't like the idea of a modal popup - very clunky.
我最近使用隐藏文本框完成了此操作,当用户双击或按 F2 时,我将显示该隐藏文本框位于填充了所选项目文本的列表框项目上方。当用户按下 Enter 键或文本框失去焦点时,文本框将被隐藏,列表框项目文本将替换为编辑框文本。如果用户按下 Esc 键,则文本框将被隐藏,并且列表项文本保持不变(即取消)。
I did this recently using a hidden text box that I would show positioned over the list box item populated with the selected item text when the user double clicked or pressed F2. When the user pressed enter or the text box lost focus, the text box was hidden and the list box item text was replaced with the edit box text. If the user pressed escape, the text box was hidden and the list item text remained unchanged (i.e cancel).