Page 1 of 1

H-scrollbar: how set to left

Posted: 03 Sep 2009, 18:03
by thVb6
Hi,
sometimes, when setting long treeview paths, the H-Scrollbar turns away from left side, so that the treeview vertically is shown somewhere in middle.
How is it possible, to set the scrollbar to the left stop position?
Thanks in advance!
TH

Re: H-scrollbar: how set to left

Posted: 03 Sep 2009, 21:46
by TiKu
Hi,

have a look at the SetScrollPos API function. Something like this:

Code: Select all

SetScrollPos ExplorerTreeView1.hWnd, SB_HORZ, 0, 1
TiKu

Re: H-scrollbar: how set to left

Posted: 04 Sep 2009, 09:52
by thVb6
Hi Tiku, works fine.
nPos seems to be measured in pixel?
yours TH

Re: H-scrollbar: how set to left

Posted: 04 Sep 2009, 10:04
by TiKu
Yes, this should be pixels.

By the way, have you tried setting the AutoHScroll property to False? Maybe you don't need the API call.