aboutsummaryrefslogtreecommitdiff
path: root/lib/gui/elistbox.cpp
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-05-14 15:23:23 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-05-14 15:23:23 +0000
commit7bc4a59528ab13f3062dc1520e76f9ecedd87400 (patch)
tree9d6e91be12147eee77d82ec5b49c24ae44f85bd3 /lib/gui/elistbox.cpp
parentab8d418f82b2835c267d88ded5d748a6f0e8a852 (diff)
downloadenigma2-7bc4a59528ab13f3062dc1520e76f9ecedd87400.tar.gz
enigma2-7bc4a59528ab13f3062dc1520e76f9ecedd87400.zip
- work on timers
- add eInput widget - add python/Tools - add flexible listbox content
Diffstat (limited to 'lib/gui/elistbox.cpp')
-rw-r--r--lib/gui/elistbox.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp
index ba2e3522..4598fa09 100644
--- a/lib/gui/elistbox.cpp
+++ b/lib/gui/elistbox.cpp
@@ -9,6 +9,8 @@ eListbox::eListbox(eWidget *parent): eWidget(parent)
ePtr<eActionMap> ptr;
eActionMap::getInstance(ptr);
+ m_itemheight = 20;
+
ptr->bindAction("ListboxActions", 0, 0, this);
}
@@ -146,11 +148,19 @@ int eListbox::event(int event, void *data, void *data2)
void eListbox::recalcSize()
{
- m_itemheight = 20;
m_content->setSize(eSize(size().width(), m_itemheight));
m_items_per_page = size().height() / m_itemheight;
}
+void eListbox::setItemHeight(int h)
+{
+ if (h)
+ m_itemheight = h;
+ else
+ m_itemheight = 20;
+ recalcSize();
+}
+
void eListbox::entryAdded(int index)
{
/* manage our local pointers. when the entry was added before the current position, we have to advance. */