简体   繁体   中英

C# Day from Week picker component

This question is for C# 2.0 Winform.

For the moment I use checkboxes to select like this : Monday[x], Thuesday[x]¸... etc.

It works fine but is it a better way to get the day of the week? (Can have more than one day picked)

Checkboxes are the standard UI component to use when selection of multiple items is allowed. From UI usability guru Jakob Nielsen's article on Checkboxes vs. Radio Buttons :

"Checkboxes are used when there are lists of options and the user may select any number of choices, including zero, one, or several. In other words, each checkbox is independent of all other checkboxes in the list, so checking one box doesn't uncheck the others."

When designing a UI, it is important to use standard or conventional components for a given task. Using non-standard components generally causes confusion . For example, it would be possible to use a combo box which would allow multiple items to be selected. However, this would require the user to use Ctrl + click on the desired items, an action which is not terribly intuitive for most people.

复选框似乎合适。

You can also use a ListView with CheckBoxes on...

for a little less hard coding.

Checkboxes would work fine, and there is a preexisting paradigm of that usage in Windows Scheduled Tasks. To see that example, create a scheduled task and select Weekly for the frequency.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM