Scrollbar height and width
-
Hi, Forgive me if this is a silly question. I'm new to this. How can one find out the height and width of the scrollbars of a treeview control? I have a treeview which i'm trying to resize when the form is resized. I'm doing this;
Me.TreeView1.Height = Me.ClientSize.Height - x
I need to figure out 'x' so that the scrollbar stays inside the form!
-
Hi, Forgive me if this is a silly question. I'm new to this. How can one find out the height and width of the scrollbars of a treeview control? I have a treeview which i'm trying to resize when the form is resized. I'm doing this;
Me.TreeView1.Height = Me.ClientSize.Height - x
I need to figure out 'x' so that the scrollbar stays inside the form!
You should make sure the treeview stays inside the form. The scrollbar will follow automatically. Appropriate anchoring and docking will do that for you.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures." जय हिंद
-
You should make sure the treeview stays inside the form. The scrollbar will follow automatically. Appropriate anchoring and docking will do that for you.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures." जय हिंद
d@nish wrote:
You should make sure the treeview stays inside the form
That is what i was trying to do with the piece of code i'd posted. But unless i subtract a certain value (which i assume is the height of scrollbar), the treeview's scrollbar strays out of the form! interestingly if i simply use the docking property (Fill), the resizing works fine but the scrollbar is never shown. hence my attempt to do it manually.
-
d@nish wrote:
You should make sure the treeview stays inside the form
That is what i was trying to do with the piece of code i'd posted. But unless i subtract a certain value (which i assume is the height of scrollbar), the treeview's scrollbar strays out of the form! interestingly if i simply use the docking property (Fill), the resizing works fine but the scrollbar is never shown. hence my attempt to do it manually.
Assuming the treeview is in the left part of the form along the height, anchor it to top, left and bottom. Also make sure scrollable property is true.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures." जय हिंद
-
Assuming the treeview is in the left part of the form along the height, anchor it to top, left and bottom. Also make sure scrollable property is true.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures." जय हिंद