spinbutton magic



I'd like to be able to handle my own "spin" functions for a GTK
spin button.  Is there any clean way to do this?  My ultimate
goal is to allow the spinbutton control to take numbers with units,
and do a little validation in the process.  I'd need to catch the
following events:

    * button presses for spin up/down
    * changed for entry area

Right now the only option I have is to step in on the adjustment's
update signal, do my own adjustment (with evaluation of text for
conversion between unit systems), do not let GTK handle the adjustment
update for the spinbutton, and manually set the text in the entry area.
The problem with this is I've got to block the adjustments when I do
the final set to avoid an adjustment/update recursion problem.

Any suggestions?

-- 
Shaw Terwilliger



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