Package dtk :: Package ui :: Module scrolled_window :: Class ScrolledWindow

Class ScrolledWindow

source code


The scrolled window with deepin's custom scrollbar.

Instance Methods
 
__init__(self, right_space=2, top_bottom_space=3)
Init scrolled window.
source code
 
add_with_viewport(self, child)
Used to add children without native scrolling capabilities.
source code
 
add_child(self, child)
Add the child to this ScrolledWindow.The child should have
source code
 
get_vadjustment(self)
Returns the vertical scrollbar's adjustment, used to connect the vectical scrollbar to the child widget's vertical scroll functionality.
source code
 
get_hadjustment(self)
Returns the horizontal scrollbar's adjustment, used to connect the horizontal scrollbar to the child widget's horizontal scroll functionality.
source code
 
set_hadjustment(self, adj)
Sets the gtk.Adjustment for the horizontal scrollbar.
source code
 
set_vadjustment(self, adj)
Sets the gtk.Adjustment for the vertical scrollbar.
source code
Method Details

__init__(self, right_space=2, top_bottom_space=3)
(Constructor)

source code 

Init scrolled window.

Parameters:
  • right_space - the space between right border and the vertical scroolbar.
  • top_bottom_space - the space between top border and the vertical scroolbar.

add_with_viewport(self, child)

source code 

Used to add children without native scrolling capabilities.

If a child has native scrolling, use ScrolledWindow.add() insetad

of this function.

Parameters:
  • child - the child without native scrolling.

add_child(self, child)

source code 

Add the child to this ScrolledWindow.The child should have

native scrolling capabilities.

Parameters:
  • child - the child with native scrolling.

set_hadjustment(self, adj)

source code 

Sets the gtk.Adjustment for the horizontal scrollbar.

Parameters:
  • adj - horizontal scroll adjustment

set_vadjustment(self, adj)

source code 

Sets the gtk.Adjustment for the vertical scrollbar.

Parameters:
  • adj - vertical scroll adjustment