tree ctrl vertical scroll bar
-
Does anyone know if it is possible to place the vertical scrollbar within the tree control on the left-hand side of the window, rather than the right (while still displaying left-to-right text)? Dave
-
Does anyone know if it is possible to place the vertical scrollbar within the tree control on the left-hand side of the window, rather than the right (while still displaying left-to-right text)? Dave
I don't know if it's possible to retrieve the scrollbars provided by the tree control to set the SBS_LEFTALIGN style (I once read a discussion about, but I don't remember the conclusion...) However, you could always do the following: a) make the tree control big enough to be without scroll bars (you need to calc the "ideal height" for it anyway - but that's no big problem) b) create your own scroll bar with SBS_LEFTALIGN c) set the correct clipping style for the parent (I think it should be WS_CLIPCHILDREN) d) handle the scroll events by moving the tree control's y position e) Handle selection changes correctly, so the selection is always inside the tree --- f) TVM_GETITEMRECT will prove invaluable for all these tasks ;) g) if you expect a horizontal scrollbar as well, you should implement it on your own in a similar way. it looks dead ugly otherwise Yeah, a lot of work (and I don't really see the benefit of an left-aligned scrollbar over it's "non-standardness". But you decide ;) )
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
sighist | Agile Programming | doxygen -
I don't know if it's possible to retrieve the scrollbars provided by the tree control to set the SBS_LEFTALIGN style (I once read a discussion about, but I don't remember the conclusion...) However, you could always do the following: a) make the tree control big enough to be without scroll bars (you need to calc the "ideal height" for it anyway - but that's no big problem) b) create your own scroll bar with SBS_LEFTALIGN c) set the correct clipping style for the parent (I think it should be WS_CLIPCHILDREN) d) handle the scroll events by moving the tree control's y position e) Handle selection changes correctly, so the selection is always inside the tree --- f) TVM_GETITEMRECT will prove invaluable for all these tasks ;) g) if you expect a horizontal scrollbar as well, you should implement it on your own in a similar way. it looks dead ugly otherwise Yeah, a lot of work (and I don't really see the benefit of an left-aligned scrollbar over it's "non-standardness". But you decide ;) )
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
sighist | Agile Programming | doxygenI didn't think it was easy... The reason i wanted one was because i have two tree controls next to each other and i'm drawing lines between them - the scrollbar is sort of in the way. Dave