P
Peder Y
How can I set e.DrawFocusRectangle() correct in an owerdrawn
multiselect listbox?
I do all my drawing (e.g. OnMouseMove) calling OnDrawItem and
constructing the DrawItemEventArgs. The problem is that I never know
exactly when to draw the focus rectangle. The DrawFocusRectangle()
method is always called, but keeping track of which DrawItemState
needed to pass is hard work. I have a gut feeling this can be done
easier, but don't know how. It seems redundant that I will need to
pass on every time a mouse click is done or arrows or pgup/dn/home/end
etc are pressed. This info must be kept somewhere in the listBox, I'm
sure.
- Peder -
multiselect listbox?
I do all my drawing (e.g. OnMouseMove) calling OnDrawItem and
constructing the DrawItemEventArgs. The problem is that I never know
exactly when to draw the focus rectangle. The DrawFocusRectangle()
method is always called, but keeping track of which DrawItemState
needed to pass is hard work. I have a gut feeling this can be done
easier, but don't know how. It seems redundant that I will need to
pass on every time a mouse click is done or arrows or pgup/dn/home/end
etc are pressed. This info must be kept somewhere in the listBox, I'm
sure.
- Peder -