User Tools

Site Tools


DzButtonGroup

Properties

Constructors

DAZ Script
DzButtonGroup ( DzWidget parent )

Methods

DAZ Script
voidaddButton ( DzButton button )
voidaddButton ( DzButton button, Number id )
DzButtonbutton ( Number id )
Arraybuttons ()
DzButtoncheckedButton ()
Numberid ( DzButton button )
Numberinsert ( DzButton button, Number id=-1 )
voidremoveButton ( DzButton button )
Deprecated
voidremove ( DzButton button )

Signals

voidclicked ( Number id )
voidpressed ( Number id )
voidreleased ( Number id )

Detailed Description

Provides an abstract container that manages the states of DzButton instances placed within it - it does not provide a visual representation.

See Also:

Properties


Number : count

Holds the number of buttons in this group (Read Only)


Boolean : exclusive

Holds whether or not this group is exclusive for all toggle buttons (the default is false)


Boolean : radioButtonExclusive

Holds whether or not this group is exclusive for radio buttons (the default is true)


Number : selected

Holds the checked button in an exclusive group

Constructors


DzButtonGroup( DzWidget parent )

Creates a button group as a child of the given parent widget

Methods


void : addButton( DzButton button )

Adds the specified button to this group. This is only necessary if the button was not created as a child of the group.

Parameter(s):

  • button - The button to add.

void : addButton( DzButton button, Number id )

Adds the specified button to this group with the specified id. This is only necessary if the button was not created as a child of the group.

Parameter(s):

  • button - The button to add.
  • id - The id to assign.

DzButton : button( Number id )

Parameter(s):

  • id - The id of the button to get.

Return Value:

  • The button in this group with the specified id (if any), otherwise null.

Since:

  • 4.15.0.21

Array : buttons()

Return Value:

  • A list of the buttons in this group.

DzButton : checkedButton()

Return Value:

  • The button that is currently checked (selected) in this group.

Since:

  • 4.15.0.21

Number : id( DzButton button )

Parameter(s):

  • button - The button to get the id of.

Return Value:

  • The id of the specified button (if any), otherwise -1.

Number : insert( DzButton button, Number id=-1 )

Inserts the specified button into this group, with the specified id. This is only necessary if the button was not created as a child of the group.

Parameter(s):

  • button - The button to insert.
  • id - The id to assign.

Return Value:

  • The id of button in the group.

void : removeButton( DzButton button )

Removes the specified button from this group.

Parameter(s):

  • button - The button to remove.

void : remove( DzButton button )

Deprecated

Exists only to keep old code working. Do not use in new code. Use removeButton() instead.

Signals


void : clicked( Number id )

Signature:“clicked(int)”

Emitted when a button in the group is pressed and released


void : pressed( Number id )

Signature:“pressed(int)”

Emitted when a button in the group is pressed


void : released( Number id )

Signature:“released(int)”

Emitted when a button in the group is released