By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,338 Members | 1,350 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,338 IT Pros & Developers. It's quick & easy.

ComboBox DrawItem

P: n/a
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

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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 <fr*****@home.com> wrote in message news:<uc********************************@4ax.com>. ..
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

Nov 13 '05 #2

P: n/a
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 <fr*****@home.com> wrote in message

news:<uc********************************@4ax.com>. ..
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

.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.