ComboBox DrawItem

  • Thread starter Thread starter fragget
  • Start date Start date
F

fragget

hi-

when

private void theCombo_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e)

is called for a ComboBox how do I know when
the system is drawing the item that appears in
the top of the box? i want to change the border
for that item only.


thanks - fg
 
Could you use something like:

private void theCombo_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e){
ComboBox cb = (ComboBox)sender;
object o = cb.Items[0];
/*... do stuff here with o ...*/
}

then cast that to whatever drawing type you're working with?
 
ill give it a shot and let u know how it goes
-----Original Message-----
Could you use something like:

private void theCombo_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e){
ComboBox cb = (ComboBox)sender;
object o = cb.Items[0];
/*... do stuff here with o ...*/
}

then cast that to whatever drawing type you're working with?


fragget <[email protected]> wrote in message
hi-

when

private void theCombo_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e)

is called for a ComboBox how do I know when
the system is drawing the item that appears in
the top of the box? i want to change the border
for that item only.


thanks - fg
.
 
Back
Top