掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
複数のListBoxを同時にスクロール操作するには? (ID:141614)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
VB6で....。 ListBox1 , ListBox2 , ListBox3 は同期が取れているのですよね。 即ち ListBox1 の上から3番目のお客の名前と ListBox2 の上から3番目のお客の年齢と ListBox3 の上から3番目のお客の仕事ととが...。 下記の様にしてみたら如何でしょうか? Dim i As Integer Dim j As Integer Private Sub Form_Load() 'テストの為にデータを表示させてみる For i = 1 To 9 List1.AddItem i Next i For i = 1 To 9 List2.AddItem i * 10 + i * 1 Next i For i = 1 To 9 List3.AddItem i * 100 + i * 10 + i * 1 Next i End Sub Private Sub List1_Click() 'List1 をクリックしたらList1と同じ Index の 'List2 , List3 に移動する。 List2.ListIndex = List1.ListIndex List3.ListIndex = List1.ListIndex '一番上の行になるが、処理に時間が掛かる List1.TopIndex = List1.ListIndex List2.TopIndex = List1.ListIndex List3.TopIndex = List1.ListIndex End Sub
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.