Re: Packing a button in a GtkCellRenderer
- From: Andrew Smith <asmith15 littlesvr ca>
- To: gtk-app-devel-list gnome org
- Subject: Re: Packing a button in a GtkCellRenderer
- Date: Mon, 22 Sep 2008 22:39:32 -0400
Emmanuele Bassi a écrit :
On Sun, 2008-09-21 at 21:30 -0400, Andrew Smith wrote:
A custom cell renderer (as in
http://scentric.net/tutorial/sec-custom-cell-renderers.html ) seems to
be a lot of work, apparently I have to render the button myself.. but I
may be misunderstanding.
no, you understood correctly: you need to write a custom cell renderer
that draws a button.
ciao,
Emmanuele.
Ok, so does that mean I'll have to reimplement GtkButton? That's why I
say it seems to be a lot of work.
you don't need to reimplement *all* GtkButton - mostly the gtk_paint
calls to make it possible for themes to actually paint your cell
renderer like a button.
Or can I use a GtkButton in a cell renderer?
no, you can't.
Is there a tutorial or some sample code somewhere anyone knows of that
could help me figure this out?
not that I know of; you can have a look at how the toggle cell renderer
works - it's basically all you need to implement a button.
ciao,
Emmanuele.
I had a look at GtkCellRendererToggle. That's pretty intense, I've
decided my time will be better spent adding functionality to my
application than writing hacks like that :)
I guess if this is how it's done in GTK, there's no point in looking for
an easier way.
The thing is I /would/ have to reimplement a GtkButton. See I don't just
need one drawn, I can do that (minus theme) with a pixmap. I need
everything that a button does.
Thanks for the advice though, maybe one day I'll have time to play with
things like that.
Cheers,
Andrew
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]