one scrollbar for two listboxes? 
Author Message
 one scrollbar for two listboxes?

Hi,

I want to create two listboxes with different content where each line
belongs together (like in the example A-1, B-2 ..)
So I want the scrollbar to scroll both listboxes simultaneous. Unfortunately
it only scrolls the listbox which is the last in the command (.b) When I use
MouseButton 2 in every list they manipulate the scrollbar as expected.
Please, could you correct my example, that it does the expected scrolling?

---
set a [list A B C D E F G]
set b [list 1 2 3 4 5 6 7]

listbox .a -listvar a -height 5 -yscrollcommand {.c set}
listbox .b -listvar b -height 5 -yscrollcommand {.c set}

scrollbar .c -orient vertical -command {.a yview ; .b yview}

pack .a .b .c -side left -fill y
---

cIao
Mat



Mon, 20 Jan 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. One Scrollbar for two listboxes??

2. one scrollbar for two listboxes?

3. Scrolling two listboxes with one scrollbar?

4. Two listboxes, one vert scrollbar

5. Two canvas scrolled simultaneously by the same scrollbar (an UNIQUE scrollbar and TWO or more canvas)

6. help with scrolling two listboxes by the single scrollbar

7. Two canvases (widgets), one scrollbar..

8. Join several listboxes to one scrollbar...

9. Scrolling two different widgets will one scrollbar

10. How to use one scrollbar to control two text widgets

11. Synchronizing two text- widgets to one scrollbar ?

12. Multiple listbox control with one scrollbar

 

 
Powered by phpBB® Forum Software