473,320 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Greyed out controls

Is there any way to disable controls without causing them to be greyed out?
Such as text boxes, list boxes, etc.

Thanks.
Ryan
Sep 12 '06 #1
6 2185

"Ryan" <Ty****@newsgroups.nospamwrote in message
news:eL**************@TK2MSFTNGP02.phx.gbl...
Is there any way to disable controls without causing them to be greyed
out? Such as text boxes, list boxes, etc.
There may be, by overriding stuff or using the API calls etc, but generally
it's a bad idea as if the user sees something that should work but doesn't,
they tend to think it's broken...
Sep 12 '06 #2
Not with the standard .NET winforms controls. You would have to manually
handle events, and not allow the user to enter text, and so on.

Other vendors may provide controls that allow you to override the colors of
the control even while it is disabled.

"Ryan" <Ty****@newsgroups.nospamwrote in message
news:eL**************@TK2MSFTNGP02.phx.gbl...
Is there any way to disable controls without causing them to be greyed
out? Such as text boxes, list boxes, etc.

Thanks.
Ryan

Sep 12 '06 #3
Well what I have is an application with built in Emailing capabilities for
notifying users. I have given users the ability to view previously sent
Emails, similar to Outlooks Sent Items. If they double-click on an email, I
have it open in the same form that is used to create and send mail, with all
the functionality disabled (for sending items, selecting recipients, etc).
Outlook does something very similar if you open any email in your Sent
Items - even though you can see the text body (not greyed out) you cannot
edit. I want a similar look/feel. Greying out text boxes with a large
amount of text is difficult to read and doesn't look good. I assumed this
would be a common property (like enabled). I believe I used to do it in
Access using the locked property?

Ryan

"james" <ja***@com.comwrote in message
news:45***********************@news.zen.co.uk...
>
"Ryan" <Ty****@newsgroups.nospamwrote in message
news:eL**************@TK2MSFTNGP02.phx.gbl...
>Is there any way to disable controls without causing them to be greyed
out? Such as text boxes, list boxes, etc.

There may be, by overriding stuff or using the API calls etc, but
generally it's a bad idea as if the user sees something that should work
but doesn't, they tend to think it's broken...


Sep 12 '06 #4
There is also a readonly property for textboxes, which you can try.

"Ryan" <Ty****@newsgroups.nospamwrote in message
news:OS*************@TK2MSFTNGP05.phx.gbl...
Well what I have is an application with built in Emailing capabilities for
notifying users. I have given users the ability to view previously sent
Emails, similar to Outlooks Sent Items. If they double-click on an email,
I have it open in the same form that is used to create and send mail, with
all the functionality disabled (for sending items, selecting recipients,
etc). Outlook does something very similar if you open any email in your
Sent Items - even though you can see the text body (not greyed out) you
cannot edit. I want a similar look/feel. Greying out text boxes with a
large amount of text is difficult to read and doesn't look good. I
assumed this would be a common property (like enabled). I believe I used
to do it in Access using the locked property?

Ryan

"james" <ja***@com.comwrote in message
news:45***********************@news.zen.co.uk...
>>
"Ryan" <Ty****@newsgroups.nospamwrote in message
news:eL**************@TK2MSFTNGP02.phx.gbl...
>>Is there any way to disable controls without causing them to be greyed
out? Such as text boxes, list boxes, etc.

There may be, by overriding stuff or using the API calls etc, but
generally it's a bad idea as if the user sees something that should work
but doesn't, they tend to think it's broken...



Sep 12 '06 #5
Excellent, this greys out the control but not the text, which makes it far
more readable.
Thanks!

"Marina Levit [MVP]" <so*****@nospam.comwrote in message
news:uj*************@TK2MSFTNGP06.phx.gbl...
There is also a readonly property for textboxes, which you can try.

"Ryan" <Ty****@newsgroups.nospamwrote in message
news:OS*************@TK2MSFTNGP05.phx.gbl...
>Well what I have is an application with built in Emailing capabilities
for notifying users. I have given users the ability to view previously
sent Emails, similar to Outlooks Sent Items. If they double-click on an
email, I have it open in the same form that is used to create and send
mail, with all the functionality disabled (for sending items, selecting
recipients, etc). Outlook does something very similar if you open any
email in your Sent Items - even though you can see the text body (not
greyed out) you cannot edit. I want a similar look/feel. Greying out
text boxes with a large amount of text is difficult to read and doesn't
look good. I assumed this would be a common property (like enabled). I
believe I used to do it in Access using the locked property?

Ryan

"james" <ja***@com.comwrote in message
news:45***********************@news.zen.co.uk.. .
>>>
"Ryan" <Ty****@newsgroups.nospamwrote in message
news:eL**************@TK2MSFTNGP02.phx.gbl...
Is there any way to disable controls without causing them to be greyed
out? Such as text boxes, list boxes, etc.
There may be, by overriding stuff or using the API calls etc, but
generally it's a bad idea as if the user sees something that should work
but doesn't, they tend to think it's broken...




Sep 12 '06 #6
See an article I wrote in July 2005 from http://emoreau.s2i.com/

--
HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
S2i web inc. (www.s2i.com)
http://emoreau.s2i.com/

"Ryan" <Ty****@newsgroups.nospamwrote in message
news:eL**************@TK2MSFTNGP02.phx.gbl...
Is there any way to disable controls without causing them to be greyed
out? Such as text boxes, list boxes, etc.

Thanks.
Ryan

Sep 14 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Fred B | last post by:
I used VB about a month ago and I don't recall this being greyed out. How do I get it back? Thanks.
2
by: Michelle Collier-Moore | last post by:
Please could someone offer some advice regarding adding references to an Access database? I tried to open a project a few days ago sent to me by someone whose developer had left the company. I...
0
by: Pavs | last post by:
I have inherited a ms access database that i am meant to alter and make some changes to. The database was original i believe created in Access 2000 while now i am using Access 2002 and my OS is...
0
by: murdo[nospam] | last post by:
Hi, Have created a basic vbs test recorded through the browser which loads a single page but the following error occurs when it's started: Test 'XXXXX' could not start. (0x80041013). ACT...
2
by: John H | last post by:
One of my co-workers is having problems with .net. (vis studio 2003) Her toolbox is greyed out so she can't add controls to a web form. This happens even when she starts a new project. Any...
8
by: EdB | last post by:
In VB6, you could set a check box to checked, unchecked, or greyed. The latter would be used to show a setting but disable the control. In .Net, the third choice is not greyed, but...
14
by: TonyMacaroni | last post by:
Hi everyone, total newbie to all of this so please bear with me and help if you can! I'm creating a database for a charity using Access 2002 SP3, I have a form called "Member Data". Within the...
2
by: jrdaley | last post by:
Not sure if Vista factors into the equation or not, but my guess would be YES. I installed Visual Studio 2005 (+SP1) on a Vista laptop and my ASP .NET webcontrols (and AJAX controls) are not...
6
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
I have an app that displays about 20 items of data in text boxes. Very occasionally I need to allow these to be used for data entry, but the bulk of the time they are solely for information. They...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.