From: Bruce S. <Bru...@nc...> - 2011-01-08 17:02:17
|
It would seem to be an inconsistency that currently there isn't a way to change the background of a label. However, note that you can change the opacity, so that setting opacity=0 (and perhaps box=False) may do what you want in your particular case. label currently honors scene.foreground but not scene.background; a fix would be an incompatible change but probably worth doing. Bruce Sherwood On Sat, Jan 8, 2011 at 7:59 AM, Poul Riis <Pou...@sk...> wrote: > How can I control the background color of some text in a label (see example > below - I would like a white background). > Poul Riis > > from visual.graph import * > pgraph = gdisplay(title='p vs t', xtitle='t (s)', ytitle='p (Pa)', x=0, y=0, > xmax=100, ymax=20, width=500, height=215,foreground=color.black, > background=color.white) > label(display=pgraph.display, pos=(20,10), text="Some text",color=color.red) > > > ------------------------------------------------------------------------------ > Gaining the trust of online customers is vital for the success of any > company > that requires sensitive data to be transmitted over the Web. Learn how to > best implement a security strategy that keeps consumers' information secure > and instills the confidence they need to proceed with transactions. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |