Package dtk :: Package ui :: Module tooltip

Module tooltip

source code

Functions
 
text(widget, content, *args, **kargs)
set the tooltip's text content.
source code
 
custom(widget, cb, *args, **kargs)
Set the custom tooltip content.
source code
 
show_delay(widget, delay)
set the time of the tooltip's begin show after pointer stay on the widget.
source code
 
hide_delay(widget, delay)
set the time of the tooltip's start to hide.
source code
 
hide_duration(widget, delay)
set the duration of the tooltip's hide effect duration.
source code
 
background(widget, color)
set the background of the tooltip's content.
source code
 
padding(widget, t, l, b, r)
set the padding of the tooltip's content.
source code
 
has_shadow(widget, need)
whether this widget's tooltip need shadow.
source code
 
disable(widget, is_disable)
disable this widget's tooltip
source code
 
always_update(widget, need)
Always create the new tooltip's content, used to show the
source code
 
disable_all(is_disable) source code
Function Details

text(widget, content, *args, **kargs)

source code 

set the tooltip's text content. the "content", "*args" and "**kargs" are pass to the dtk.ui.Label, so you can change the text's color and some other property.

Parameters:
  • widget - the widget of you want to change.
  • content - the text which you want show.
  • args - pass to the dtk.ui.Label
  • kargs - pass to the dtk.ui.Label
Decorators:
  • @chainmethod

custom(widget, cb, *args, **kargs)

source code 

Set the custom tooltip content.

Parameters:
  • widget - the widget of you want to change.
  • cb - the function used to generate the content widget. this function should return an gtk.Widget. Be careful: if this function generate it's content affected by other runtime factor, you alsow should use "always_update" to disable the internal cache mechanism
  • args - pass to the cb
  • kargs - pass to the cb
Decorators:
  • @chainmethod

show_delay(widget, delay)

source code 

set the time of the tooltip's begin show after pointer stay on the widget.

Parameters:
  • widget - the widget of you want to change.
  • delay - the time of start begin show.
Decorators:
  • @chainmethod

hide_delay(widget, delay)

source code 

set the time of the tooltip's start to hide.

Parameters:
  • widget - the widget of you want to change.
  • delay - the time of start begin hide.
Decorators:
  • @chainmethod

hide_duration(widget, delay)

source code 

set the duration of the tooltip's hide effect duration.

Parameters:
  • widget - the widget of you want to change.
  • delay - the time of the effect duration.
Decorators:
  • @chainmethod

background(widget, color)

source code 

set the background of the tooltip's content.

Parameters:
  • widget - the widget of you want to change.
  • color - the gdk.Color of background.
Decorators:
  • @chainmethod

padding(widget, t, l, b, r)

source code 

set the padding of the tooltip's content.

Parameters:
  • widget - the widget of you want to change.
  • t - the top space
  • l - the left space
  • b - the bottom space
  • r - the right space
Decorators:
  • @chainmethod

has_shadow(widget, need)

source code 

whether this widget's tooltip need shadow.

Parameters:
  • widget - the widget of you want disable tooltip.
  • need - wheter need shadow .
Decorators:
  • @chainmethod

disable(widget, is_disable)

source code 

disable this widget's tooltip

Parameters:
  • widget - the widget of you want disable tooltip.
  • is_disable - wheter disable tooltip.
Decorators:
  • @chainmethod

always_update(widget, need)

source code 

Always create the new tooltip's content, used to show the

curstom tooltip content generate by function and the function's

return widget is different every time be invoked.

Parameters:
  • widget - Gtk.Widget instance.
  • need - whether alwasy update.
Decorators:
  • @chainmethod