Logo Search packages:      
Sourcecode: laditools version File versions  Download package

def laditools::TreeViewTooltips::TreeViewTooltips::__init__ (   self )
Initialize the tooltip.  After initialization there are two
attributes available for advanced control:

    window: the popup window that holds the tooltip text, an
    instance of gtk.Window.
    label:  a gtk.Label that is packed into the window.  The
    tooltip text is set in the label with the
    set_label() method, so the text can be plain or
    markup text.

Be default, the tooltip is enabled.  See the enabled/disabled
methods.

Definition at line 117 of file TreeViewTooltips.py.

                      :
        
        '''
        Initialize the tooltip.  After initialization there are two
        attributes available for advanced control:

            window: the popup window that holds the tooltip text, an
                    instance of gtk.Window.
            label:  a gtk.Label that is packed into the window.  The
                    tooltip text is set in the label with the
                    set_label() method, so the text can be plain or
                    markup text.

        Be default, the tooltip is enabled.  See the enabled/disabled
        methods.
        '''

        # create the window
        self.window = window = gtk.Window(gtk.WINDOW_POPUP)
        window.set_name('gtk-tooltips')
        window.set_resizable(False)
        window.set_border_width(4)
        window.set_app_paintable(True)
        window.connect("expose-event", self.__on_expose_event)


        # create the label
        self.label = label = gtk.Label()
        label.set_line_wrap(True)
        label.set_alignment(0.5, 0.5)
        label.set_use_markup(True)
        label.show()
        window.add(label)

        # by default, the tooltip is enabled
        self.__enabled = True
        # saves the current cell
        self.__save = None
        # the timer id for the next tooltip to be shown
        self.__next = None
        # flag on whether the tooltip window is shown
        self.__shown = False


Generated by  Doxygen 1.6.0   Back to index