- Textbox(self, width, height, scroll = 0, wrap = 0): scroll, wrap are flags
include scroll bars, or text wrap.
- setText(text) : set text.
+ - setHeight(height): set height.
"""
def setText(self, text):
self.w.textboxText(text)
+ def setHeight(self, height):
+ self.w.textboxHeight(height)
+
def __init__(self, width, height, text, scroll = 0, wrap = 0):
self.w = _snack.textbox(width, height, text, scroll, wrap)
static PyObject * widgetListboxSet(snackWidget * s, PyObject * args);
static PyObject * widgetListboxClear(snackWidget * s, PyObject * args);
static PyObject * widgetTextboxText(snackWidget * s, PyObject * args);
+static PyObject * widgetTextboxHeight(snackWidget * s, PyObject * args);
static PyObject * widgetCheckboxTreeAddItem(snackWidget * s, PyObject * args);
static PyObject * widgetCheckboxTreeGetSel(snackWidget * s, PyObject * args);
static PyObject * widgetCheckboxTreeGetCur(snackWidget * s, PyObject * args);
{ "setCallback", (PyCFunction) widgetAddCallback, METH_VARARGS, NULL },
{ "labelText", (PyCFunction) widgetLabelText, METH_VARARGS, NULL },
{ "textboxText", (PyCFunction) widgetTextboxText, METH_VARARGS, NULL },
+ { "textboxHeight", (PyCFunction) widgetTextboxHeight, METH_VARARGS, NULL },
{ "entrySetValue", (PyCFunction) widgetEntrySetValue, METH_VARARGS, NULL },
{ "listboxAddItem", (PyCFunction) widgetListboxAdd, METH_VARARGS, NULL },
{ "listboxInsertItem", (PyCFunction) widgetListboxIns, METH_VARARGS, NULL },
return Py_None;
}
+static PyObject * widgetTextboxHeight(snackWidget * s, PyObject * args) {
+ int height;
+
+ if (!PyArg_ParseTuple(args, "i", &height)) return NULL;
+
+ newtTextboxSetHeight(s->co, height);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
static snackWidget * listboxWidget(PyObject * s, PyObject * args) {
snackWidget * widget;
int height;