D
Dom
Just two questions that I'd like answered to complete my mental
picture.
1. Why do I need to set the DrawMode property in order to get the
DrawItem event raised. In other events, I just name the event-handler
and then write it, and the event is raised. (In VB, I just had to
write it, which still seems better). But for this one event, I have
to flag the fact that I want it raised. Any reason?
2. If I add the first items to a listbox in the form's Load event, I
get a call to DrawItem for each addition, and I can use e.Index to see
if it is the first, second, or third item. But if I add the first
items elsewhere, eg, in response to a button click, I first get a
series of calls to DrawItem in which e.Index = -1. Any reason?
Dom
picture.
1. Why do I need to set the DrawMode property in order to get the
DrawItem event raised. In other events, I just name the event-handler
and then write it, and the event is raised. (In VB, I just had to
write it, which still seems better). But for this one event, I have
to flag the fact that I want it raised. Any reason?
2. If I add the first items to a listbox in the form's Load event, I
get a call to DrawItem for each addition, and I can use e.Index to see
if it is the first, second, or third item. But if I add the first
items elsewhere, eg, in response to a button click, I first get a
series of calls to DrawItem in which e.Index = -1. Any reason?
Dom