Hi guys, it's been a long time...
Anyway, I'm trying to create a scrollable frame using only tk.
I tried with text widgets containing other widgets but the scrollbar associated with the text widget won't scroll if the widgets are displayed outside the text widgets.
here is my dirty code:
<code>
scrollbar .sbar
text .text -relief flat -yscrollcommand {.sbar set}
.sbar configure -command ".text yview"
labelframe .text.f1 -text "f1" -pady 5
labelframe .text.f2 -text "f2" -pady 5
labelframe .text.f3 -text "f3" -pady 5
.text window create end -window .f1
.text window create end -window .f2
.text window create end -window .f3
button .text.f1.b -text "ok"
button .text.f2.b -text "ok"
button .text.f3.b -text "ok"
pack .text -side left -fill both -expand yes
pack .sbar -side left -fill y
pack .text.f1.b .text.f2.b .text.f3.b -side top -expand yes
</code>
Anyone can give me a hand with that?
Anyway, I'm trying to create a scrollable frame using only tk.
I tried with text widgets containing other widgets but the scrollbar associated with the text widget won't scroll if the widgets are displayed outside the text widgets.
here is my dirty code:
<code>
scrollbar .sbar
text .text -relief flat -yscrollcommand {.sbar set}
.sbar configure -command ".text yview"
labelframe .text.f1 -text "f1" -pady 5
labelframe .text.f2 -text "f2" -pady 5
labelframe .text.f3 -text "f3" -pady 5
.text window create end -window .f1
.text window create end -window .f2
.text window create end -window .f3
button .text.f1.b -text "ok"
button .text.f2.b -text "ok"
button .text.f3.b -text "ok"
pack .text -side left -fill both -expand yes
pack .sbar -side left -fill y
pack .text.f1.b .text.f2.b .text.f3.b -side top -expand yes
</code>
Anyone can give me a hand with that?