void eListboxTestContent::paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected)
{
- ePtr<gFont> fnt = new gFont("Arial", 14);
+ ePtr<gFont> fnt = new gFont("Arial", 20);
painter.clip(eRect(offset, m_size));
style.setStyle(painter, selected ? eWindowStyle::styleListboxSelected : eWindowStyle::styleListboxNormal);
painter.clear();
void eListboxStringContent::paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected)
{
- ePtr<gFont> fnt = new gFont("Arial", 14);
+ ePtr<gFont> fnt = new gFont("Arial", 20);
painter.clip(eRect(offset, m_itemsize));
style.setStyle(painter, selected ? eWindowStyle::styleListboxSelected : eWindowStyle::styleListboxNormal);
painter.clear();
m_list = list;
Py_INCREF(m_list);
}
+
+ //always invalidate when we get a new list
+ if (m_listbox)
+ m_listbox->invalidate();
}
PyObject *eListboxPythonStringContent::getCurrentSelection()
m_listbox->entryChanged(index);
}
+void eListboxPythonStringContent::invalidate()
+{
+ if (m_listbox)
+ m_listbox->invalidate();
+}
+
//////////////////////////////////////
void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected)
{
- ePtr<gFont> fnt = new gFont("Arial", 14);
+ ePtr<gFont> fnt = new gFont("Arial", 20);
ePtr<gFont> fnt2 = new gFont("Arial", 16);
painter.clip(eRect(offset, m_itemsize));
style.setStyle(painter, selected ? eWindowStyle::styleListboxSelected : eWindowStyle::styleListboxNormal);
/* CallObject will call __call__ which should return the value tuple */
value = PyObject_CallObject(value, args);
+
+ if (PyErr_Occurred())
+ PyErr_Print();
Py_DECREF(args);
/* the PyInt was stolen. */
}
/* check if this is really a tuple */
- if (PyTuple_Check(value))
+ if (value && PyTuple_Check(value))
{
/* convert type to string */
PyObject *type = PyTuple_GetItem(value, 0);
}
}
Py_XDECREF(type);
- }
+ } else
+ eWarning("eListboxPythonConfigContent: second value of tuple is not a tuple.");
/* value is borrowed */
}