[GiDlist] TCL-TK procedure
Posted: Fri Sep 12, 2003 1:08 pm
(gid 6.3.0b win2000)
Hi GiD team
Question 1: I have a tcl module in my problemtype & I am getting some
strange behaviour. When I execute an external program I pipe out the stdout
to a file whose full path & name is held in infoP the procedure below opens
a window & displays the file contents when the process has completed. The
first time this executes everything is OK but if I run the process again the
infowindow appears the full size of the screen. If I reload the problem type
& re run the same thing happens it's full size, I need to close Gid &
relaunch it to get the window to behave properly. Is this a bug or is there
a fix ?
proc CreateWindow {dir msg infoP} {
set w .gid.infowin
InitWindow $w "Info window for $infoP" datawin
frame $w.top
pack $w.top -pady 10 -padx 10
set t [text $w.top.t -setgrid true -wrap word \
-width 80 -height 30 -yscrollcommand "$w.top.sy set"]
scrollbar $w.top.sy -orient vert -command "$w.top.t yview"
pack $w.top.sy -side right -fill y
pack $w.top.t -side left -fill both -expand true
frame $w.bottom
button $w.bottom.leave -text "close" \
-height 1 -width 14 -command "destroy $w" -bg PaleGoldenrod
pack $w.bottom.leave -pady 2
pack $w.bottom
set f [open $infoP r]
while {[gets $f inln] !=-1} {
set txln "$inln\n"
$w.top.t insert end $txln
}
close $f
}
Question 2: Are there any other parameters to the gid tcl call WarnWinText
other than the text string to be displayed i.e. can I specify the window
size & position etc ?
Question 3: similar to 2, how can I specify the position of the window
created by the procedure CreateWindow above ?
Thank in advance
Best regards
Mark
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003
The information contained in this e-mail message (and any attachment
transmitted herewith) is privileged and confidential and is intended for the
exclusive use of the addressee(s). If you are not an addressee, any
disclosure, reproduction, distribution or other dissemination or use of this
communication is strictly prohibited. If you have received this
communication in error, please contact us immediately so that we can correct
the error.
Hi GiD team
Question 1: I have a tcl module in my problemtype & I am getting some
strange behaviour. When I execute an external program I pipe out the stdout
to a file whose full path & name is held in infoP the procedure below opens
a window & displays the file contents when the process has completed. The
first time this executes everything is OK but if I run the process again the
infowindow appears the full size of the screen. If I reload the problem type
& re run the same thing happens it's full size, I need to close Gid &
relaunch it to get the window to behave properly. Is this a bug or is there
a fix ?
proc CreateWindow {dir msg infoP} {
set w .gid.infowin
InitWindow $w "Info window for $infoP" datawin
frame $w.top
pack $w.top -pady 10 -padx 10
set t [text $w.top.t -setgrid true -wrap word \
-width 80 -height 30 -yscrollcommand "$w.top.sy set"]
scrollbar $w.top.sy -orient vert -command "$w.top.t yview"
pack $w.top.sy -side right -fill y
pack $w.top.t -side left -fill both -expand true
frame $w.bottom
button $w.bottom.leave -text "close" \
-height 1 -width 14 -command "destroy $w" -bg PaleGoldenrod
pack $w.bottom.leave -pady 2
pack $w.bottom
set f [open $infoP r]
while {[gets $f inln] !=-1} {
set txln "$inln\n"
$w.top.t insert end $txln
}
close $f
}
Question 2: Are there any other parameters to the gid tcl call WarnWinText
other than the text string to be displayed i.e. can I specify the window
size & position etc ?
Question 3: similar to 2, how can I specify the position of the window
created by the procedure CreateWindow above ?
Thank in advance
Best regards
Mark
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003
The information contained in this e-mail message (and any attachment
transmitted herewith) is privileged and confidential and is intended for the
exclusive use of the addressee(s). If you are not an addressee, any
disclosure, reproduction, distribution or other dissemination or use of this
communication is strictly prohibited. If you have received this
communication in error, please contact us immediately so that we can correct
the error.