gtk.ColorSelectionDialog
Prev | The gtk Class Reference | Next

## gtk.ColorSelectionDialog

gtk.ColorSelectionDialog — a standard dialog for selecting a color.

## Synopsis

    class gtk.ColorSelectionDialog(gtk.Dialog):
        gtk.ColorSelectionDialog(title)
        def get_color_selection()

## Ancestry

    +-- gobject.GObject
      +-- gtk.Object
        +-- gtk.Widget
          +-- gtk.Container
            +-- gtk.Bin
              +-- gtk.Window
                +-- gtk.Dialog
                  +-- gtk.ColorSelectionDialog

## Implemented Interfaces

`gtk.ColorSelectionDialog` implements `gtk.Buildable`

## gtk.ColorSelectionDialog Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

gtk.Window Properties

gtk.Dialog Properties

"cancel-button" | Read | The cancel button of the dialog.
"color-selection" | Read | The color selection embedded in the dialog.
"help-button" | Read | The help button of the dialog.
"ok-button" | Read | The OK button of the dialog.

## gtk.ColorSelectionDialog Style Properties

gtk.Widget Style Properties

gtk.Dialog Style Properties

## Attributes

"colorsel" | Read | The `gtk.ColorSelection` widget contained in the dialog.
"ok_button" | Read | The "OK" button contained in the dialog.
"cancel_button" | Read | The "Cancel" button contained in the dialog.
"help_button" | Read | The "Help" button contained in the dialog.

## gtk.ColorSelectionDialog Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

gtk.Window Signal Prototypes

gtk.Dialog Signal Prototypes

## Description

The `gtk.ColorSelectionDialog` provides a standard dialog that allows a user to select a color. The `gtk.ColorSelectionDialog` uses an embedded `gtk.ColorSelection` to provide color selection capability.

Use the attributes (ok_button, cancel_button and help_button) of the colorselectiondialog to connect handlers to the "OK", "Cancel" and "Help" button "clicked" signals. The colorsel attribute provides access to the colorselection widget. Connect a handler to its "color-changed" signal to be notified when the color is changed. The current color can be retrieved using the `gtk.ColorSelection.get_current_color`() method.

## Constructor

        gtk.ColorSelectionDialog(title)

`title` : | a string to be used as the dialog title.
Returns : | a new colorselectiondialog

Creates a new `gtk.ColorSelectionDialog` using the string contained in `title` as the text for the dialog title.

## Methods

### gtk.ColorSelectionDialog.get_color_selection

        def get_color_selection()

Returns : | the embedded `gtk.ColorSelection`.

### Note

This method is available in PyGTK 2.14 and above.

The `get_color_selection`() method retrieves the `gtk.ColorSelection` widget embedded in the dialog.

Prev | Up | Next
gtk.ColorSelection | Home | gtk.Combo