how do you use the FXFont class on FXRuby so that you can change the font and color of the text on your application? THANKS!
Asked
Active
Viewed 273 times
1 Answers
0
The typeface or font used for text is a separate concept from the text color.
Suppose we're dealing with an FXLabel widget. If you want to change the font used for the label, you can set that using the label's "font" attribute, e.g.
label = FXLabel.new(...)
labelFont = FXFont.new(...)
labelFont.create
label.font = labelFont
On the other hand, if you want to change the label's text color, assign to its "textColor" attribute, e.g.
label.textColor = FXRGB(255, 0, 0)
Hope this helps.

Lyle Johnson
- 46
- 3