treectrl scrollbar problem: "expected floiting point"
- From: Horst Stanitzok <stanitzoks@xxxxxx>
- Date: Mon, 28 Feb 2011 16:17:00 +0000 (UTC)
tktreectrl 2.3
I tried to make a scrollbars around a simple treectrl using an example in
"Understanding TkTreeCtrl.html". I got this error message:
expected floating-point number but got "0,616667"
while executing ".sv set 0 0,616667"
But tktreectrl 2.3 in itself runs without errors. - What is wrong with my
code?
My code is:
treectrl .t -showroot no -width 410 -height 300 \
-highlightthickness 0 -selectmode extended
..t configure -xscrollcommand ".sh set" -yscrollcommand ".sv set"
ttk::scrollbar .sh -orient horizontal -command ".t xview"
ttk::scrollbar .sv -orient vertical -command ".t yview"
pack .sv -side right -fill y
pack .sh -side bottom -fill x
pack .t -expand yes -fill both
set columnID [.t column create -itembackground linen]
..t element create elemBorder border \
-background #ece9d8 -filled yes -relief solid -thickness 1
..t element create elemText text
..t style create style1
..t style elements style1 {elemBorder elemText} .t style layout style1
elemBorder -union {elemText} -ipadx 4 -ipady 4 .t style layout style1
elemText
foreach n {5 15 20 10 10 5 15 10 20 15 15 25 10 5 15 5 10 20 15 25} {
set itemID [.t item create]
.t item style set $itemID $columnID style1 set text [string range
"abcdefghijklmnopqrstuvwxyz" 0 $n] .t item element configure $itemID
$columnID elemText -text $text .t item lastchild root $itemID
}
.
- Follow-Ups:
- Re: treectrl scrollbar problem: "expected floiting point"
- From: Manfred Stelzhammer
- Re: treectrl scrollbar problem: "expected floiting point"
- Prev by Date: Re: Update app from within the app
- Next by Date: Re: treectrl scrollbar problem: "expected floiting point"
- Previous by thread: file read / close / write fluke error invalid argument
- Next by thread: Re: treectrl scrollbar problem: "expected floiting point"
- Index(es):
Relevant Pages
|