I want a frame to pop up with this in it. $tbodytext is my var of html
code. I did check the var before and after the render call, and it is
correct (i know i should not use globa vars but its my first TK
program and need to access info every where. I can also post my full
code (other then render it works, and u just need tk and the gmailer
library.)
So the question is, can it not render the string i pass it? If i set
static text it displays that. i could save it to a file then read the
file , but i dont really want to do that.
Becker
$tbody_root=TkRoot.new
$tbody_frame_over = TkToplevel.new($root){}
$tbody_frame_over.withdraw
---------cut out code---------
#the $Account is a gmail count, this gets the email info
localtext=""+$Account.msg(temp).dt_easy + " subject:
" + $Account.msg(temp).subject
localtext=localtext+ " Body: "
localtext=localtext+ test
$tbodytexts=(localtext+"").to_s
p $tbodytexts
x = (200)
y = (200)
$tbody_frame_over.geometry("+#{x+1}+#{y+1}")
$tbody_frame_over.deiconify
$tbody_frame_over.raise
cut out code
TkFrame.new($tbody_frame_over){
tkbodys=Tk::Iwidgets::Scrolledhtml.new(self){ }.pack “side”=>“top”
tkbodys.height=200
tt=$tbodytexts
tkbodys.render(tt)
TkButton.new(self) {
text “ok”
command {
$tbody_frame_over.withdraw
}}.pack “side”=>“bottom”
}.pack “side”=>“left”
I was trying every combination of anything, and this works. dont know
what but it does.
I moved the elements of the frame up to the top instead of making a
new frame, and moved the render to the call that makes it visable.
Also i save the text to a temp file. I didnt want to do this, but it
works.
Still any ideas would be welcome.
$tbody_root=TkRoot.new
$tbody_frame_over = TkToplevel.new($root){
$gtkbodys=Tk::Iwidgets::Scrolledhtml.new(self){ }.pack “side”=>“top”
$gtkbodys.height=200
TkButton.new(self) {
text “ok”
command {
$tbody_frame_over.withdraw
}}.pack “side”=>“bottom”
}
$tbody_frame_over.withdraw
-------------cut-----
localtext=""+$Account.msg(temp).dt_easy + " subject:
" + $Account.msg(temp).subject
localtext=localtext+ " Body: "
localtext=localtext+ test
$tbodytexts=(localtext+"").to_s
# p $tbodytexts
x = (200)
y = (200)
#tt=
#p $tbodytexts
tf = Tempfile.new(“afile”)
tf.puts($tbodytexts)
# p tf.path
tf.close
tf.open
$gtkbodys.render($tbodytexts)
$tbody_frame_over.geometry("+#{x+1}+#{y+1}")
$tbody_frame_over.deiconify
$tbody_frame_over.raise
From: “ruby talk” [email protected]
Subject: Re: Tk::Iwidgets::Scrolledhtml render problem
Date: Sun, 19 Mar 2006 05:49:29 +0900
Message-ID: [email protected]
I was trying every combination of anything, and this works. dont know
what but it does.
I moved the elements of the frame up to the top instead of making a
new frame, and moved the render to the call that makes it visable.
Also i save the text to a temp file. I didnt want to do this, but it
works.
I couldn’t re-generate your problem.
When did you call “Tk.mainloop”?
“Tk.update” is sometimes helpful to fix some cases of drawing troubles.