dionysus_83
New Member
- Joined
- Feb 24, 2016
- Messages
- 30
I have listbox that adjust to screen resolution of user computer. Since it is also auto-fit it's columns in some cases scrollbar appear so user could view all columns in listbox!
Since I didn't want to use column header option of listbox I've put labels above listbox of each column.
Of course in case of scrollbar appearance labels remains static and doesn't move along with listbox causing a confusion.
How to move labels with the listbox in case scrollbar appear? Or how to move two listbox simultaneously in case of scrollbar appearance?
I've tried using two listbox where one is showing just 1st row (header) in style I prefer, and second as body, and tried with following code to "attach" them one to another:
But with no luck! Listbox2 doesn't move along with ListBox1!
Since I didn't want to use column header option of listbox I've put labels above listbox of each column.
Of course in case of scrollbar appearance labels remains static and doesn't move along with listbox causing a confusion.
How to move labels with the listbox in case scrollbar appear? Or how to move two listbox simultaneously in case of scrollbar appearance?
I've tried using two listbox where one is showing just 1st row (header) in style I prefer, and second as body, and tried with following code to "attach" them one to another:
Code:
Private Sub ListBox1_Click()
[COLOR=#333333]ListBox2.ListIndex = ListBox1.ListIndex
[/COLOR]end sub
But with no luck! Listbox2 doesn't move along with ListBox1!