Re: Text alignment in a custom cell renderer?
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Text alignment in a custom cell renderer?
- Date: Tue, 11 Jul 2006 12:28:47 +0200
On Mon, 2006-07-10 at 11:03 +1000, Daniel Kasak wrote:
I assume I have to get the value of the 'xalign' property and manually
set alignment, but I can't quite figure out how to do that. There's no
parent object for the layout ( I originally thought it might have a
Gtk2::Alignment parent ... as in my previous alignment question ... but
no such luck in this case ). I've tried the 'set_alignment' method of
the layout object, but this doesn't seem to align things either. Any clues?
I think you'll have to override GET_SIZE and return an appropriate
x-offset value, depending on the desired alignment. See `perldoc
Gtk2::CellRenderer´ / DERIVING NEW CELL RENDERERS. For an example, take
a look at gtkcellrenderertext.c in gtk+'s source, function get_size().
--
Bye,
-Torsten
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]