How to display text file content in ruby widget

S

sujeet kumar

hi=20
I want to open any text file of my computer and display the contents
of file in Ruby Tk. I used menu button to reach the contents of
my comp. Now how to display the content of text in Ruby Frame. Which
widget should i use ? Tk Canvas or other ... Also if I want to make
content read only what should I do?
Please help
regards
sujeet
 
H

Hidetoshi NAGAI

From: sujeet kumar <[email protected]>
Subject: How to display text file content in ruby widget
Date: Thu, 16 Jun 2005 23:03:40 +0900
Message-ID: said:
my comp. Now how to display the content of text in Ruby Frame. Which
widget should i use ? Tk Canvas or other ...

Use a TkText widget.
Also if I want to make content read only what should I do?

After inserting the text into the TkText widget,
set 'state' option of the TkText widget to 'disabled'.

# Please see the man of Tcl/Tk's text widget (man n text).
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top