← KDE Visual Design Group/HIG/RadioButtons You do not have permission to edit this page, for the following reason: The action you have requested is limited to users in one of the groups: Users, Administrators, trusted, KDEDevelopers. You can view and copy the source of this page. __NOTOC__ == Purpose == ''Radio buttons'' offer the user a choice of two or more mutually exclusive options. Try to limit the number of radio buttons and radio button groups in a dialog. Offering a high number of radio buttons consumes screen space and adds to visual clutter. At the same time, showing all available options at once is an advantage if users are likely not to know possible alternatives. == Examples == [[File:Radio_buttons.png]] == Guidelines == === Is this the right control === * Use radio buttons for a few mutually exclusive options. If there are more than five options (or if there is not enough space to arrange four or five options), use a [[KDE_Visual_Design_Group/HIG/Combo_Box| combo box]] or list instead. [[File:RadioButtons-1-good.png]][[File:RadioButtons-1-bad.png]] * If there are only two options where one is the negation of the other (e.g. "apply" vs. "do not apply"), consider replacing the radio buttons by one [[KDE_Visual_Design_Group/HIG/Check_Box| check box]]. [[File:RadioButtons-2-good.png]][[File:RadioButtons-2-bad.png]] * Use radio buttons if the user should see the choices without further interaction. [[File:RadioButtons-3-good.png]][[File:RadioButtons-3-bad.png]] * Do not use a radio button to initiate an action. Consider using a [[../Buttons|push button]] instead. [[File:RadioButtons-4-good.png]][[File:RadioButtons-4-bad.png]] === Behavior === * Radio buttons are not dynamic; their content or labels should not change depending on the context. * Always have one radio button selected. * Make the first item the default option. === Appearance === * Provide a descriptive label above or left to a group of radio buttons in [[KDE_Visual_Design_Group/HIG/Capitalization#Sentence_Style_Capitalization|sentence style capitalization]]. * Use [[KDE_Visual_Design_Group/HIG/Capitalization#Title_Capitalization|title style capitalization]] for the radio button options. * Align groups of radio buttons vertically rather than horizontally, as this makes them easier to scan visually. * If toggling a radio button affects the enabled state of other controls, place the controls that it affects next to the radio button or below and indented. * When using a radio button and none of the options is a valid choice, add another option to reflect this choice, such as None or Does not apply. == Implementation == * [http://qt-project.org/doc/qt-4.8/qradiobutton.html QRadioButton] * [http://qt-project.org/doc/qt-4.8/qbuttongroup.html QButtonGroup] Templates used on this page: Template:Box1 (view source) Template:Note (view source) Return to KDE Visual Design Group/HIG/RadioButtons. Retrieved from "https://community.kde.org/KDE_Visual_Design_Group/HIG/RadioButtons"