Re: CellRendererSpinButton in a List



zentara wrote:
I've used the basic CellRendererSpinButton package
which has been mentioned here before. The problem is that
I can't seem to get the spin box to update to it's new value
in the list. I can spin them up and down, and when I set them,
with a click or enter, they revert to 0.

If I manually edit the cell, and press enter, the liststore seems
to get the value, but it does not appear in the spinbox cell, which
remains 0.00.
This sounds astonishingly similar to a problem I'm having with CellRendererCombo:
http://bugzilla.gnome.org/show_bug.cgi?id=317387 ( see above post )

Basically, CellRendererText is set up so that when the focus leaves the editable things, an 'edited' signal is fired. This means that a user can type stuff in a cell, and then immediately click outside the TreeView, and the changes are detected ( ie the edited signal is fired ).

Unfortunately, this doesn't happen ( automatically ) in other renderers, for example CellRendererCombo, and your CellRendererSpinButton. In these cases, you have to force an edited signal by pressing the Enter key ... or by clicking somewhere else inside the TreeView ( but outside the current cell ). In your case, since you only have one cell in the TreeView, there's nothing else to click into, so your only way of triggering the 'edited' signal is to use the keyboard. If there is some way to *make* this happen in code, then I'm all ears :) This issue is going to present a large problem for me soon too ...

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
website: http://www.nusconsulting.com.au



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]