Re: I cant run this tcl example! What is wrong with it?



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
.



Relevant Pages

  • Re: missing tabs under local user properties on WTS 2003!
    ... If this file is missing you would have the same problems. ... > terminal server is not in a domain environment! ... after one week four tabs of the ... > Can it be related with "Terminal Server licensing" because we have ...
    (microsoft.public.windows.terminal_services)
  • [kde] KIPI Plugins HTML Gallery
    ... There are no left-side tabs, no config options such as generation ... When I use the plugin from inside konqueror (Tools -> Create Image Gallery) I ... Am I missing something here? ...
    (KDE)
  • Re: inbox preview pane
    ... But at the moment all I have showing is 1 huge list of all ... I have tried looking all through the tabs trying to ... | customise this view to be shown but I must be missing it somewhere. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Python IDE/text-editor
    ... interpreter AND tabs... ... however are missing the embedded ... "screenshot" and featureset, e.g. ...
    (comp.lang.python)