Click to See Complete Forum and Search --> : Drawing in ScrollBar


AAP
October 9th, 2008, 02:39 PM
I've got a ListBox with items that are scrolled with the vertical scrollbar. There is some dragging and dropping in the ListBox that allows reorder list box items. To make a visual cue to a user between which items the dragged item will be inserted, I want to draw arrows on both sides of the list box and a line between arrow. The left arrow is drawn on the parent form client area (beyond the list box on the left), but I don't know how I can do one of the two following:
1. Draw the right arrow on the scroll bar. It seems be not so easy as I thought before, since I cannot get the graphics context for the scrollbar.
2. Draw the right arrow on the parent form client area, but then I need to connect the arrows with the line, but I cannot draw the line across the scroll bar.

When I gets Graphics for the list box with ListBox.CreateGraphics(), I can draw in the list box area only, but I cannot on the scrollbar.

Any suggestions how can I do that simple drawing on the scrollbar?