Mr. Sparkle,
You can use the -hide option of the entry widget like this:
entry .e -textvariable aaa -hide *
Any characters that are typed in .e are displayed as astrisks. The readable value is stored in the variable aaa.
Jeff.
You can use bind to capture any keypress like this:
bind . <Any-KeyPress> { your_proc %K }
This will pass the procedure "your_proc" the key that was pressed. The stock example is this:
bind . <Any-KeyPress> { puts "Keysym is %K" }
Good luck
Jeff.
Try the after command
after 2000 {.fileSizelbl configure -text [file size data.dat]}
This should keep the GUI active. Time units are milliseconds.
In order to do this every 2 seconds forever, you'll need a proc that calls itself using after - something like this:
proc file_size_update { } {...
To get a list of the files in directory /tmp/abcd:
set file_list [glob -nocomplain /tmp/abcd/*]
To write the list to a file, simply open a file for write and run through file_list with a foreach. If you need more info than just the file name, you can use the "file" command to get...
send only works if the wish interpreters share a display.
I'm assuming you have control of the sockets on both the server and on the client.
You can send line by line and stop when you get to eof. The only way I've found to do this (and I'm by no means an expert) is for the server to close the...
Assuming you're running some variant of Unix, here's an example:
catch {exec ls /tmp &} bg_pid
bg_pid should contain the pid of the background process. You can then exec a kill to finish the job.
Jeff.
Escape question mark with a backslash. See example below.
set aaa "?an?il?"
regsub -all {\?} $aaa "" bbb
bbb should contain "anil"
Jeff.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.