473,513 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

text on a disabled combobox

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
4 5531
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
5678
by: schmendrick | last post by:
Is it possible to disable a control with Text (Textbox, combobox etc) but not have the text fade? I have a bunch of text boxes for a database, want them disabled till i hit the edit key, not a...
0
2802
by: Stephen Muecke | last post by:
To overcome the hard-to-read text associated with a disabled combobox, I have created my own and overriden the OnEnabledChanged method as follows (note the control also includes a DisabledBackColor...
3
3348
by: Brian Mitchell | last post by:
Is it possible to change the fore and back colors of a combo box when its enabled property is set to false? I need to lock the value of my combo boxes (and still keep its color) but that control...
4
3976
by: Keith | last post by:
Hello - this started out as a minor annoyance - and now is starting to bother me more and more - I'm hoping someone can help me. I would like to have a combobox display - NOT initially be blank...
5
1539
by: DC | last post by:
Hi All, When a control is disabled, it is grayed out. Is there anyway to set a different foreground/background color for disabled controls (combobox, textbox, etc). Thanks. DC
10
2069
by: news.microsoft.com | last post by:
I am new to this so bear with me. I have a set of combo boxes. Lets call them ComboBox1 and ComboBox2. ComboBox1 items are pulled from a table. When a user selects a certain item I want to...
3
6266
by: bhanubalaji | last post by:
hi, I am unable to disable the text(label) in javascript..it's working fine with IE,but i am using MOZILLA.. can any one help regarding this.. What's the wrong with my code? I am...
3
1272
by: kea62227 | last post by:
I have a combobox. In the validating event of the combobox I check what value is chosen. If the value is "Skip" then I set the next control in the tabindex to enabled=false. But when I tab out of...
1
2551
by: stewdizzle | last post by:
I have a from with three radio buttons (same group) and three text boxes. The radio buttons give the user a choice of uploading one, two, or three images. Currently, I have the text boxes load as...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5085
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.