Package dtk :: Package ui :: Module combo :: Class ComboBox

Class ComboBox

source code


ComboBox class.

Instance Methods
 
__init__(self, items, droplist_height=None, select_index=0, max_width=None)
Initialize ComboBox class.
source code
 
select_first_item(self)
Select first item.
source code
 
select_last_item(self)
Select last item.
source code
 
select_prev_item(self)
Select preview item.
source code
 
select_next_item(self)
Select next item.
source code
 
set_select_index(self, item_index)
Set select index.
source code
 
get_item_with_index(self, item_index)
Get item with given index.
source code
 
get_current_item(self)
Get current item.
source code
Class Variables
  __gsignals__ = {"item-selected":(gobject.SIGNAL_RUN_LAST, gobj...
Method Details

__init__(self, items, droplist_height=None, select_index=0, max_width=None)
(Constructor)

source code 

Initialize ComboBox class.

Parameters:
  • items - ComboBox item, item format: (item_label, item_value)
  • droplist_height - You can set maximum height of droplist, default is None.
  • select_index - Initialize selected index, default is 0.
  • max_width - Maximum width of ComboBox, default is None that width along with content.

set_select_index(self, item_index)

source code 

Set select index.

Parameters:
  • item_index - The index of selected item.

get_item_with_index(self, item_index)

source code 

Get item with given index.

Returns:
Return item that match given index, or return None if haven't special index.

get_current_item(self)

source code 

Get current item.

Returns:
Return current item.

Class Variable Details

__gsignals__

Value:
{"item-selected":(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (str, go\
bject.TYPE_PYOBJECT, int,)), "key-release":(gobject.SIGNAL_RUN_LAST, g\
object.TYPE_NONE, (str, gobject.TYPE_PYOBJECT, int,)),}