473,569 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2195

"Ryan" <Ty****@newsgro ups.nospamwrote in message
news:eL******** ******@TK2MSFTN GP02.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****@newsgro ups.nospamwrote in message
news:eL******** ******@TK2MSFTN GP02.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.comw rote in message
news:45******** *************** @news.zen.co.uk ...
>
"Ryan" <Ty****@newsgro ups.nospamwrote in message
news:eL******** ******@TK2MSFTN GP02.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****@newsgro ups.nospamwrote in message
news:OS******** *****@TK2MSFTNG P05.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.comw rote in message
news:45******** *************** @news.zen.co.uk ...
>>
"Ryan" <Ty****@newsgro ups.nospamwrote in message
news:eL******* *******@TK2MSFT NGP02.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******** *****@TK2MSFTNG P06.phx.gbl...
There is also a readonly property for textboxes, which you can try.

"Ryan" <Ty****@newsgro ups.nospamwrote in message
news:OS******** *****@TK2MSFTNG P05.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.comw rote in message
news:45******* *************** *@news.zen.co.u k...
>>>
"Ryan" <Ty****@newsgro ups.nospamwrote in message
news:eL****** ********@TK2MSF TNGP02.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****@newsgro ups.nospamwrote in message
news:eL******** ******@TK2MSFTN GP02.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
8804
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
32171
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 found that I had a reference problem and went to the usual Tools, References place to fix it. The References option was greyed out and as I have...
0
2385
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 XP. When i go to File and try to save i find the Save button and Save AS buttons greyed out (disabled)! It does or did at one stage keep asking...
0
1404
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 requires permissions for 'log on as a batch job' policy as detailed in http://support.microsoft.com/default.aspx?scid=kb;en-us;318849 but this option...
2
1586
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 ideas? Or should she reinstall? J
8
4668
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 indeterminate. And the doc says it shows it as greyed, but checked. So how do you show greyed and unchecked? Disabling the control in total greys out the...
14
6553
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 form I have two fields: "Employed?" and "Employment Details". "Employed?" is either Yes or No and is pulled from a table called...
2
1423
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 registering in intellisense and are not avail for drag/drop from the toolbox (greyed out). I can force them in there and compile/run just fine. I...
6
12185
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 all sit in a GroupBox that is normally disabled, but is enabled when data can be edited. The users complain that when the GroupBox.Enabled=False, the...
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7921
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7666
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6278
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2107
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 we have to send another system
1
1208
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.