Re: CellRendererSpinButton in a List



On Mon, 6 Mar 2006 12:34:55 -0500
zentara <zentara1 sbcglobal net> wrote:

On Sun, 5 Mar 2006 22:35:54 -0500
muppet <scott asofyet org> wrote:

You've answered your own question ---- add code to your START_EDITING  
to hook up a handler to the new editable's "focus-out-event" signal.

Yeah, I'm starting to play around with signals in the SpinCellRenderer
and am getting results. 
But I still cannot alter the text which appears in the column after
the Spin Button disaappears. I can get the value which I want to set there,
but I can't get it in.

Is there a way I can keep the spincell widget displayed constantly? 
That would be preferable for me anyways, I like seeing that widget
sitting there.


Well sorry Muppet, I don't want to waste your time, but I think I found the
problem.

It's only preliminary, but I'm sure I have a handle on it.

The problem seems to be related to the CellRendererSpinButton
package needs a section like

sub SET_PROPERTY {
    my ($self, $pspec, $val) = @_;

    if ($pspec->get_name eq 'value') {
        $self->{value} = $val;
     }
}

That lets the initial value set in the ListStore's cells when you
load the list store with initial values.

I have to work out the exact details of the SET_PROPERTY
sub, to let all the settings thru, but I'm sure the problem is solved.

I'll have an example soon. :-)

zentara


-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html



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