[fxruby-users] Styled text on arrays

Stuart Clarke stuart_clarke86 at yahoo.com
Mon Dec 1 08:00:48 EST 2008


I have a few questions with FX colors for styling text.

I have a GUI with a FXText frame which upon running my programs is populated with the contents of an array in a separate method using the @evtrievefindings.join("\n"). This array is populated in a method with quite a lot of information throughout the running of the program eg.

if 100
@evtrievefindings.push "info"
end
if 200 
@evtrievefindings.push "different info"

end

I was wondering can I use styled text to assign one occurance of @evtrievefindings.push as being in the colour red, eg.

if 100

@evtrievefindings.push "info"

end

if 200 

@evtrievefindings.push.changestyle "different info"


end

Does this make sense? Basically I want my program to write the contents of the array to the text frame as normal but when data meets one criteria I want the data written to the array to be a colour.

I know you can use FX to colour specified text, however I do not know what the text is.

Thanks in adavnce.



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20081201/72d82bf6/attachment.html>


More information about the fxruby-users mailing list