Difference between revisions of "Documentation/DevGuide/Basic/Check Box"
OOoWikiBot (Talk | contribs) m (Robot: Changing Category:Documentation/Developers Guide/Basic and Dialogs) |
OOoWikiBot (Talk | contribs) m (FINAL VERSION FOR L10N) |
||
Line 6: | Line 6: | ||
|NextPage=Documentation/DevGuide/Basic/Option Button | |NextPage=Documentation/DevGuide/Basic/Option Button | ||
}} | }} | ||
− | {{DISPLAYTITLE:Check Box}} | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/Basic/{{SUBPAGENAME}}}} |
+ | {{DISPLAYTITLE:Check Box}} | ||
The check box control <idl>com.sun.star.awt.UnoControlCheckBox</idl> is used in groups to display multiple choices so that the user can select one or more choices. When a check box is selected it displays a check mark. Check boxes work independently of each other, thus different from option buttons. A user can select any number of check boxes at the same time. | The check box control <idl>com.sun.star.awt.UnoControlCheckBox</idl> is used in groups to display multiple choices so that the user can select one or more choices. When a check box is selected it displays a check mark. Check boxes work independently of each other, thus different from option buttons. A user can select any number of check boxes at the same time. | ||
Revision as of 12:36, 15 May 2009
The check box control com.sun.star.awt.UnoControlCheckBox is used in groups to display multiple choices so that the user can select one or more choices. When a check box is selected it displays a check mark. Check boxes work independently of each other, thus different from option buttons. A user can select any number of check boxes at the same time.
The property State
, where 0 is not checked, 1 is checked, 2 is don't know, accesses and changes the state of a checkbox. The tri-state mode of a check box is enabled by setting the TriState
property to True. A tri-state check box provides the additional state "don't know", that is used to give the user the option of setting or unsetting an option.
oCheckBoxModel = oDialog.Model.CheckBox3 oCheckBoxModel.TriState = True oCheckBoxModel.State = 2
The same result is achieved by using the com.sun.star.awt.XCheckBox interface:
oCheckBox = oDialog.getControl("CheckBox3") oCheckBox.enableTriState( True ) oCheckBox.setState( 2 )
Content on this page is licensed under the Public Documentation License (PDL). |