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

text on a disabled combobox

P: n/a
Hi,

I need to make the text on a combobox that is disabled to be drawn with a
black color. I was not able to find any help on this online. The drawItem
seems to apply only for the dropdpwn items. Any ideas or sugesstions would be
appreciated.

Thank you,

Vish

Mar 13 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hello vish,

Unfortunately this is missed in .NET, till you draw control yourself

v> I need to make the text on a combobox that is disabled to be drawn
v> with a black color. I was not able to find any help on this online.
v> The drawItem seems to apply only for the dropdpwn items. Any ideas or
v> sugesstions would be appreciated.
v>
v> Thank you,
v>
v> Vish
v>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 14 '06 #2

P: n/a
Hi Michael,

Thanks for your reply. I have been trying to search more information on it
so that i can paint the control myself. Even there i had run into trouble.
The combobox OnPaint event paints only the border and the button portion of
the combobox. The textbox portion of the combobox was not accessible. So i
had to use Win32 functions to get an handle to the text box portion of the
combobox. But again the painting of the textbox portion of the combobox works
fine when the combobox is enabled but it does not work when the control is
disabled even though the OnPaint and the same code is getting executed. Any
ideas?

Thank You,
Vish
"Michael Nemtsev" wrote:
Hello vish,

Unfortunately this is missed in .NET, till you draw control yourself

v> I need to make the text on a combobox that is disabled to be drawn
v> with a black color. I was not able to find any help on this online.
v> The drawItem seems to apply only for the dropdpwn items. Any ideas or
v> sugesstions would be appreciated.
v>
v> Thank you,
v>
v> Vish
v>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Mar 14 '06 #3

P: n/a
Hello vish,

try look for the answer here http://www.syncfusion.com/FAQ/Window...88c.aspx#q547q
and here http://www.codeproject.com/cs/combobox/

v> Hi Michael,
v>
v> Thanks for your reply. I have been trying to search more information
v> on it so that i can paint the control myself. Even there i had run
v> into trouble. The combobox OnPaint event paints only the border and
v> the button portion of the combobox. The textbox portion of the
v> combobox was not accessible. So i had to use Win32 functions to get
v> an handle to the text box portion of the combobox. But again the
v> painting of the textbox portion of the combobox works fine when the
v> combobox is enabled but it does not work when the control is disabled
v> even though the OnPaint and the same code is getting executed. Any
v> ideas?
v>
v> Thank You,
v> Vish
v> "Michael Nemtsev" wrote:
v>
Hello vish,

Unfortunately this is missed in .NET, till you draw control yourself

v> I need to make the text on a combobox that is disabled to be drawn
v> with a black color. I was not able to find any help on this
online.
v> The drawItem seems to apply only for the dropdpwn items. Any ideas
or
v> sugesstions would be appreciated.
v>
v> Thank you,
v>
v> Vish
v>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 14 '06 #4

P: n/a
Hi Michael,

Thanks for your suggestions. I did look at both the links that you had sent
me. Unfortunately they did not solve my problem. The first link paints the
items in the drop down and not in the combobox itself.

Thank You,
Vish
"Michael Nemtsev" wrote:
Hello vish,

try look for the answer here http://www.syncfusion.com/FAQ/Window...88c.aspx#q547q
and here http://www.codeproject.com/cs/combobox/

v> Hi Michael,
v>
v> Thanks for your reply. I have been trying to search more information
v> on it so that i can paint the control myself. Even there i had run
v> into trouble. The combobox OnPaint event paints only the border and
v> the button portion of the combobox. The textbox portion of the
v> combobox was not accessible. So i had to use Win32 functions to get
v> an handle to the text box portion of the combobox. But again the
v> painting of the textbox portion of the combobox works fine when the
v> combobox is enabled but it does not work when the control is disabled
v> even though the OnPaint and the same code is getting executed. Any
v> ideas?
v>
v> Thank You,
v> Vish
v> "Michael Nemtsev" wrote:
v>
Hello vish,

Unfortunately this is missed in .NET, till you draw control yourself

v> I need to make the text on a combobox that is disabled to be drawn
v> with a black color. I was not able to find any help on this
online.
v> The drawItem seems to apply only for the dropdpwn items. Any ideas
or
v> sugesstions would be appreciated.
v>
v> Thank you,
v>
v> Vish
v>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

Mar 14 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.