ComboBox DrawItem

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
 
C

Chris Hornberger

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?
 
F

fragget

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
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top