Re: Creating new widgets



Hi again,

Hmmm. My curiosity is piqued - how does one make a 'fake' button like SpinButtons? I'm assuming its a Frame with an EventBox and an Arrow, which sounds simple enough, but then there's themey type things which I'm still a little hazy on. What would the FakeButton need to know from the theme, and how would it get that info?

Thanks,
MB

On 10/14/06, muppet <scott asofyet org> wrote:

On Oct 13, 2006, at 2:42 AM, Matthew Braid wrote:

> This is slightly off topic but related, the top row of this widget
> will need an extra button (the 'add to top' button), but I want
> this button to 'stack' on top of the normal add below button.
> Attached is a screen shot to demonstrate the existing perl/Tk widget.
>
> I can't seem to find a way to shrink the internal padding of a
> button to allow halving its height without losing any internal room
> for the arrow image. I know it must be possible (Gtk2::SpinButton
> has two 'little' buttons with less internal padding) but I can't
> figure out how.

Those little buttons in SpinButton are not standard Button widgets
--- they are specially drawn (using the theme code) by SpinButton's
expose handlers.

You could do the same thing, though that would make your widget
rather more complicated.

Or, you could implement the whole thing with a TreeView, which gives
you drag and drop reordering, gratis.

--
The door is locked.  I tried to open it, but the lock is harder to
pick than a broken nose.
   -- Sensei, on 'I, Ninja'




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