Re: [Fxruby-users] Text color
Status: Inactive
Brought to you by:
lyle
From: meinrad r. <mei...@gm...> - 2004-04-10 12:38:38
|
Arash Abedinzadeh wrote: > Hi, > > I wonder if there's a way to color specific strings, e.g. I would like to > color the word "bottle" blue and "neck" red. This is what I've tried: > > text = FXText.new(aFrame, nil, 0, TEXT_WORDWRAP|TEXT_READONLY) > text.text = "a lot of text" > text.textColor = 255 > > What I get is the color red for the whole text. > Did I miss something in the API documentation? obviously yes. changeStyle(pos, n, style) Change the style of n characters at position pos in the text buffer to style. Here, style is either an integer into the style table, indicating the new style for all the affected characters; or style is a String… kind regards, - henon > > Regards, > > Arash > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > Fxruby-users mailing list > Fxr...@li... > https://lists.sourceforge.net/lists/listinfo/fxruby-users > > |