[Gtk-sharp-list] Changing widget colors
Chris Ferrell
csferrel@swbell.net
Sat, 12 Apr 2003 15:11:45 -0500
This is a multi-part message in MIME format.
--Multipart_Sat__12_Apr_2003_15:11:45_-0500_082019f8
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Hello All
I've got a small program which tries to change the background and foreground colors of its widgets but doesn't work. Attached is the code(small). Any help is appreciated.
--Multipart_Sat__12_Apr_2003_15:11:45_-0500_082019f8
Content-Type: application/octet-stream;
name="CommandWindow.cs"
Content-Disposition: attachment;
filename="CommandWindow.cs"
Content-Transfer-Encoding: base64
dXNpbmcgU3lzdGVtOwp1c2luZyBHdGtTaGFycDsKdXNpbmcgR3RrOwp1c2luZyBHZGs7CgoKCi8v
LzxzdW1tYXJ5PgovLy8gYSB3aW5kb3cgd2l0aCBhIGNvbW1hbmQgbGluZSBhbmQgYSBjb21tdW5p
Y2F0aW9ucyB3aW5kb3cKLy8vPC9zdW1tYXJ5PgoKcHVibGljIGRlbGVnYXRlIHZvaWQgQ29tbWFu
ZFByb2Nlc3MgKHN0cmluZyBjb21tYW5kKTsKCmNsYXNzIENvbW1hbmRXaW5kb3cgOiBHdGsuV2lu
ZG93CnsKCXByaXZhdGUgRW50cnkgY29tbWFuZExpbmU7Cglwcml2YXRlIFRleHRWaWV3IHRleHRW
aWV3OwoKCXByaXZhdGUgVGV4dEJ1ZmZlciB0ZXh0QnVmZmVyOwoJcHJpdmF0ZSBWQm94IHZCb3g7
Cglwcml2YXRlIFNjcm9sbGVkV2luZG93IHN3OwoJcHJpdmF0ZSBIU2VwYXJhdG9yIGhzZXA7Cglw
cml2YXRlIEdkay5Db2xvciBiYWNrR3JvdW5kOwoJcHJpdmF0ZSBHZGsuQ29sb3IgZm9yZUdyb3Vu
ZDsKCglwdWJsaWMgRW50cnkgQ29tbWFuZExpbmUKCXsKCQlnZXQKCQl7CgkJCXJldHVybiBjb21t
YW5kTGluZTsKCQl9Cgl9CgoJcHVibGljIFRleHRWaWV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