(2014-01-15, 19:31)volatil3 Wrote: How do I set width and height of textbox, by looking code, I guess it is depending on Grid's width and height?
Sizes of individual controls depend on the size of the main window and row/column count in window's coordinate grid. You can also adjust the sizes of individual control by using
pad_x and
pad_y parameters of
placeControl method.
As for your other question in PM, the answer is actually covered in PyXBMCt Quick Start Guide and the demo add-on.
Your mistake is that you are trying to connect a function call, not a function object, which is wrong.
Wrong:
Code:
self.connect(foo, bar())
Correct:
Code:
self.connect(foo, bar)
Where: foo - a control object, bar - a function/method name.
If you need to connect a function with parameters known at runtime, you should use
lambda:
Wrong:
Code:
self.connect(foo, bar(x, y))
Correct:
Code:
self.connect(foo, lambda: bar(x, y))
BTW, other Python GUI frameworks, e.g. Tkinter use the same approach.
P.S. I think questions regarding PyXBMCt specifics (if any) better to discuss in the respective topic.