Re: I cant run this tcl example! What is wrong with it?
- From: Ahmad <ahmad.abdulghany@xxxxxxxxx>
- Date: Wed, 26 Mar 2008 04:24:46 -0700 (PDT)
On Mar 26, 12:31 pm, Uwe Klein <uwe_klein_habertw...@xxxxxxxxxxx>
wrote:
Ahmad wrote:
Hi,
I was looking for tabbednotebook sample code, and i had found this
peice of code:
## The original code is got from:
##### http://incrtcl.sourceforge.net/iwidgets/iwidgets/tabnotebook.html
# missing:
package require Iwidgets
# end missing
# there is a pure tcl notebook from D. Richard Hipp available:
#http://www.hwaci.com/sw/tk/nbpi.html
# another usefull one is in BLT included.
wm title . "Tabnotebook Example"
##=========================================================
## Create a tabnotebook iwidget
##=========================================================
##
iwidgets::tabnotebook .tn \
-tabpos n \
-width 350 \
-height 250 \
-angle 0 \
-background #336699 \
-tabbackground white \
-foreground white \
-bevelamount 4 \
-gap 3 \
-margin 6 \
-tabborders 0 \
-backdrop #666666
##
## Add some tabs
##
foreach t {one two three four} {
set tb($t) [.tn add -label "Tab [string totitle $t]"]
frame $tb($t).f \
-bd 2
label $tb($t).f.l \
-text "This is tab $t" \
-background #336699 \
-foreground white \
-font {Helvetica 16 bold}
pack $tb($t).f.l $tb($t).f \
-expand 1 \
-fill both
}
pack .tn
.tn delete 1
##
## select the second tab (zero based)
##
.tn select 1
####################################################
How can i run this code to see tabs in GUI? What are extra line(s)
needed to be added to the code to be able to run it?
Thanks in advance and best regards,
Ahmad
Thank you very much for the prompt reply, I could run the code by
sourcing it directly from wish by typing: source name.tcl
Also i could make it excutable by adding the #! operator followed with
wish path
Thanks alot and best regards,
Ahmad
.
- References:
- I cant run this tcl example! What is wrong with it?
- From: Ahmad
- Re: I cant run this tcl example! What is wrong with it?
- From: Uwe Klein
- I cant run this tcl example! What is wrong with it?
- Prev by Date: Re: I cant run this tcl example! What is wrong with it?
- Next by Date: Re: Tcl Web Service with Authorization kills Tcl
- Previous by thread: Re: I cant run this tcl example! What is wrong with it?
- Next by thread: wiki engine for etcl on pocketpc
- Index(es):
Relevant Pages
|