tk text tag_configure

E

Ed Redman

I am trying to use Ruby/tk and a TkText object and change the text font on
each line.

I can set the font and fontsize but when I do change the Tktext object.
All the text is changed. I believe I have to tag the text object in some
way but I am missing some point.

I am using a tcl file font.tcl as a model. There is a line in the tcl code
that I can't seem to get the ruby context.

..t tag configue f[incr count] -font [list $family 10]

if I have an object text = TkText.new could someone help me translate this
into ruby/tk.
I believe it is something like "text.tag_configure" but after this I am
lost.

thanks in advance
 
J

Joel VanderWerf

Ed said:
I am trying to use Ruby/tk and a TkText object and change the text font on
each line.

I can set the font and fontsize but when I do change the Tktext object.
All the text is changed. I believe I have to tag the text object in some
way but I am missing some point.

I am using a tcl file font.tcl as a model. There is a line in the tcl code
that I can't seem to get the ruby context.

.t tag configue f[incr count] -font [list $family 10]

if I have an object text = TkText.new could someone help me translate this
into ruby/tk.
I believe it is something like "text.tag_configure" but after this I am
lost.

thanks in advance

Take a look at sample/demos-en/style.rb. It creates a text box with
multiple fonts, faces, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top