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.
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).|