eActionMap::getInstance(ptr);
m_itemheight = 25;
+ m_selection_enabled = 1;
ptr->bindAction("ListboxActions", 0, 0, this);
}
for (int y = 0, i = 0; i <= m_items_per_page; y += m_itemheight, ++i)
{
- m_content->paint(painter, *style, ePoint(0, y), m_selected == m_content->cursorGet() && m_content->size());
+ m_content->paint(painter, *style, ePoint(0, y), m_selected == m_content->cursorGet() && m_content->size() && m_selection_enabled);
m_content->cursorMove(+1);
}
recalcSize();
}
+void eListbox::setSelectionEnable(int en)
+{
+ if (m_selection_enabled == en)
+ return;
+ m_selection_enabled = en;
+ entryChanged(m_selected); /* redraw current entry */
+}
+
void eListbox::entryAdded(int index)
{
/* manage our local pointers. when the entry was added before the current position, we have to advance. */