473,657 Members | 2,456 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to stop disabled text boxes being greyed out

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.Enable d=False, the greyed out text boxes are hard to
read. I would like to find a way to disable the GroupBox whilst leaving the
text boxes clearly visible.
--
John Austin

--
John Austin
Nov 27 '07 #1
6 12205
You might try setting each textbox's ReadOnly property to True, instead of
disabling them. Then when you wanted to enable (make them non ReadOnly), you
could:

For Each ctrl As Control In GroupBox1.Contr ols
If TypeOf ctrl Is TextBox Then
DirectCast(ctrl , TextBox).ReadOn ly = False
End If
Next

--
Terry
"John Austin" wrote:
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.Enable d=False, the greyed out text boxes are hard to
read. I would like to find a way to disable the GroupBox whilst leaving the
text boxes clearly visible.
--
John Austin

--
John Austin
Nov 27 '07 #2
John
Although it is possible to use the Readonly property to lock the contents of
a Texbox. As a user I would expect a normal looking textbox to be editable
only to find that it is not. You may want to work with your uses to see how
they feel about this. Sometimes could be quite frustrating unless you show
them some visual cue as to when it is disabled and when enabled for editing.

Regards,

Trevor Benedict
MCSD

"John Austin" <Jo*********@no spam.nospamwrot e in message
news:4D******** *************** ***********@mic rosoft.com...
>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.Enable d=False, the greyed out text boxes are hard
to
read. I would like to find a way to disable the GroupBox whilst leaving
the
text boxes clearly visible.
--
John Austin

--
John Austin

Nov 27 '07 #3
Yes, I do a similar thing to set the text boxes BackColor in
GroupBox1.Enabl edChanged so that it is obvious to the user when they can and
can't type in the boxes. The thing I don't like about setting ReadOnly is
that if the user can get the cursor in the box, they then phone up and ask
why they can't type anything. I really want to make the Text Boxes look like
labels when they can't type in them, and like text boxes when they can.

Thanks for the suggestion.
--
John Austin
"Terry" wrote:
You might try setting each textbox's ReadOnly property to True, instead of
disabling them. Then when you wanted to enable (make them non ReadOnly), you
could:

For Each ctrl As Control In GroupBox1.Contr ols
If TypeOf ctrl Is TextBox Then
DirectCast(ctrl , TextBox).ReadOn ly = False
End If
Next

--
Terry
"John Austin" wrote:
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.Enable d=False, the greyed out text boxes are hard to
read. I would like to find a way to disable the GroupBox whilst leaving the
text boxes clearly visible.
--
John Austin

--
John Austin
Nov 27 '07 #4
Our postings have crossed - I agree!
--
John Austin
"Trevor Benedict" wrote:
John
Although it is possible to use the Readonly property to lock the contents of
a Texbox. As a user I would expect a normal looking textbox to be editable
only to find that it is not. You may want to work with your uses to see how
they feel about this. Sometimes could be quite frustrating unless you show
them some visual cue as to when it is disabled and when enabled for editing.

Regards,

Trevor Benedict
MCSD

"John Austin" <Jo*********@no spam.nospamwrot e in message
news:4D******** *************** ***********@mic rosoft.com...
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.Enable d=False, the greyed out text boxes are hard
to
read. I would like to find a way to disable the GroupBox whilst leaving
the
text boxes clearly visible.
--
John Austin

--
John Austin


Nov 27 '07 #5
I agree, but a ReadOnly textbox is not normal looking. It has a 'control'
color background. Also, if you clue your users by changing the background
when they enter it, you can skip that for a readonly.
--
Terry
"Trevor Benedict" wrote:
John
Although it is possible to use the Readonly property to lock the contents of
a Texbox. As a user I would expect a normal looking textbox to be editable
only to find that it is not. You may want to work with your uses to see how
they feel about this. Sometimes could be quite frustrating unless you show
them some visual cue as to when it is disabled and when enabled for editing.

Regards,

Trevor Benedict
MCSD

"John Austin" <Jo*********@no spam.nospamwrot e in message
news:4D******** *************** ***********@mic rosoft.com...
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.Enable d=False, the greyed out text boxes are hard
to
read. I would like to find a way to disable the GroupBox whilst leaving
the
text boxes clearly visible.
--
John Austin

--
John Austin


Nov 27 '07 #6
The only real problem is that users complain that they have difficulty
reading greyed out text boxes.
The objective of 'greying out' is a visual cue to show the user that the
text box is disabled, not to prevent them reading it easily.
A better solution from Microsoft would be to treat Enabled=False the same
way as ReadOnly=True, if system colours are used, apply grey; If custom
colours are used leave it to the programmer.
--
John Austin
"Terry" wrote:
I agree, but a ReadOnly textbox is not normal looking. It has a 'control'
color background. Also, if you clue your users by changing the background
when they enter it, you can skip that for a readonly.
--
Terry
"Trevor Benedict" wrote:
John
Although it is possible to use the Readonly property to lock the contents of
a Texbox. As a user I would expect a normal looking textbox to be editable
only to find that it is not. You may want to work with your uses to see how
they feel about this. Sometimes could be quite frustrating unless you show
them some visual cue as to when it is disabled and when enabled for editing.

Regards,

Trevor Benedict
MCSD

"John Austin" <Jo*********@no spam.nospamwrot e in message
news:4D******** *************** ***********@mic rosoft.com...
>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.Enable d=False, the greyed out text boxes are hard
to
read. I would like to find a way to disable the GroupBox whilst leaving
the
text boxes clearly visible.
--
John Austin
>
--
John Austin
Dec 4 '07 #7

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

Similar topics

3
8598
by: JLM | last post by:
I have a form which I want users to "view only" certain fields. I don't want a tab stop on those fields, I don't want focus on those fields; nothing, just view only. When scrolling through the records of the form, these fields have focus. How can I get those fields to be view only and no tab stops. The field's tab properties are Auto Tab=No, Tab Stop=No, Tab Indes=No. What am I missing here? Thanks in advance, Jeff
0
2389
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 me whether i wanted to convert
6
2096
by: MLH | last post by:
You know how the text in the attached label sort of 'greys out' when you click something that sets MyTextbox.Enabled = False? I would like to make a label's text look like that? How do I do it? It look sort-a-like sunken text or shadowed - I don't know what.
5
6926
by: Robert Phillips | last post by:
I have a Panel control containing a few TextBox controls. The Panel is originally enabled, I enter data into the TextBox controls. When I submit, the Panel is disabled during the PostBack and the TextBox controls render greyed-out, and I can see the values in the TextBox controls....this is what I expected. I submit again, the Panel is enabled during the PostBack. All of the TextBox controls within the Panel are now enabled, however,...
0
1651
by: uthooker | last post by:
I have an Access form with some combo boxes in the Form Header that are enabled/disabled using conditional formatting based on the setting in a checkbox also in the Header (Combo box = Enabled by default; when Checkbox = False, Combo Box = Disabled.). When I open the form, the combo boxes are behaving as expected, and when I change records (using the standard arrow buttons at the bottom of the form) to a record with a different setting...
0
1187
by: Swoosh | last post by:
Hi All, I am using ASP.Net Webcontrol to emit some HTML. The control is either a HyperLink or LinkButton. When I disable the control (by setting the controlls Enabled property) the following example HTML is emitted: <a id="nevermind" disabled="disabled" class="whatever">Reports</a>
8
11214
by: rahulnag22 | last post by:
I have created a button widget with a button click binding. The button initially has a state=disabled. I can see the greyed out version of the button in the GUI. But If I click on the button it still invokes the callback/binding function. Any suggestions as to why the callback is being invoked even though the button has a disabled state. It looks like- b=Button(frame, text = "Button", state = 'disabled')
2
2869
by: damonjulian | last post by:
hi ,i created 3 buttons such that if button1 is clicked it will disable button2 ,and clicking button3 will restore state of button2 to normal, to my dismay i find that button2 still responds to clicks even if it is greyed out here is the code..am i doing something wrong? is there a way to truly disable the button?
6
4839
by: Peter | last post by:
ASP.NET 2.0 Visual Studio 2008 I have the following code and when the textbox displays and I press Enter while in the text box I get AutoPostBack, how do I stop AutoPostBack? TextBox txt = new TextBox(); txt.MaxLength = parm.MaxLength; txt.ID = parm.ParameterNameID; txt.Text = "12345";
0
8392
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6163
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1604
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.