How to get Background colour for a Widget
- From: Hywel Thomas <hywel controlspecials demon co uk>
- To: gtk-list gnome org
- Subject: How to get Background colour for a Widget
- Date: Mon, 26 Jan 2009 11:36:47 +0000
I'm trying to get the current background colour for a widget, with odd
results. I'm using the Gtk# bindings, so I'm not sure what the calls
translate into in Gtk+, but if I read a DrawingArea (da) Background with:-
Gdk.Color bg = da.Style.Backgrounds[(int)StateType.Normal];
then set the colour back to this value with
da.ModifyBg(StateType.Normal, bg);
I get a different colour from the original! If I set the default BG
with the same call, but with a null colour argument, the original
background is indeed restored, but I seem to be unable to read this
colour. The obvious property for the BG colour is
da.Style.Background(StateType.Normal), but this property is write-only
(though I'm not sure why). Any help in understanding what is going on
would be most welcome. I've tried the Gtk# list, but it was suggested
I'd do better here.
-- Hywel Thomas
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]