Message-ID: <3BEC2EA2.6010001 at inria.fr> Date: Fri, 09 Nov 2001 14:29:38 -0500 From: Maxence Guesdon MIME-Version: 1.0 To: lablgtk at kaba.or.jp Subject: set_bg seems to no work Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, I'm trying to change bg color for labels of tree items. I create the tree item this way : let item = GTree.tree_item () in let ali = GBin.alignment ~x:0. ~xscale:0. ~packing:item#add () in let label = GMisc.label ~packing:ali#add ~text: "hi" () in ... then i try to change font and color : let courier = Gdk.Font.load_fontset "fixed" in let style = label#misc#style#copy in label#misc#set_style style; style#set_bg [ (`NORMAL, `RGB (255, 0, 0)) ; (`INSENSITIVE, `RGB (255, 0, 0)) ; (`PRELIGHT, `RGB (255, 0, 0)) ; (`ACTIVE, `RGB (255, 0, 0)) ; (`SELECTED, `RGB (255, 0, 0)) ] ; style#set_font courier The font is changed but not the bg color :-( By the way, i'd like to add the methods for changing foreground color but i don't know where, for example, "ml_gtk_style_set_bg" is defined. grep ml_gtk_style_set_bg * is lablgtk-1.2.2/src tells me Binary file dlllablgtk.so matches Binary file gObj.cmo matches Binary file gObj.o matches Binary file gtkData.cmi matches Binary file gtkData.cmo matches gtkData.ml: = "ml_gtk_style_set_bg" Binary file lablgtk.a matches Binary file lablgtk.cma matches Binary file lablgtktop matches Binary file lablgtktop_t matches Binary file liblablgtk.a matches Binary file ml_gtk.o matches So i don't know where to add c functions for changing foreground color. Shouldn't there be a ml_gtk.c file ? Thanks -- Maxence Guesdon