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

Windows application - read only

P: n/a
A textbox has a attribute for ReadOnly. This seems like such a simple
concept. When a textbox is set to read only the user cannot change the
contents of the field.

I have been trying to find that missing ability for other predefined
controls in C#. The radiobutton, checkbox, and combobox controls do not
share this ability. I find it difficult to believe that this feature was
left out and Microsoft expects everyone to write their own implementation of
these controls to handle the missing functionality.

Every control shares the attribute for Enabled. Unfortunately when the
control is rendered it is difficult to read when in a disabled state. I
have looked for a way to override this with little success.

Am I missing something or is the only way to have a ReadOnly ability on
other controls is to code this myself?

Thanks
Dan





Sep 8 '08 #1
Share this Question
Share on Google+
23 Replies


P: n/a
Dan,

The readonly property makes from a TextBox (with setting the appearance) a
kind of multiline label.

I don't see the purpose of that for a Combobox, a Ceckbox or a Radiobutton,
can you enlighten that missing for me.
In my idea would the use of readonly in these cases only make the customer
to report bugs.

Cor

"Dan Tallent" <sp**@microsoft.comschreef in bericht
news:O$**************@TK2MSFTNGP02.phx.gbl...
>A textbox has a attribute for ReadOnly. This seems like such a simple
concept. When a textbox is set to read only the user cannot change the
contents of the field.

I have been trying to find that missing ability for other predefined
controls in C#. The radiobutton, checkbox, and combobox controls do not
share this ability. I find it difficult to believe that this feature
was left out and Microsoft expects everyone to write their own
implementation of these controls to handle the missing functionality.

Every control shares the attribute for Enabled. Unfortunately when the
control is rendered it is difficult to read when in a disabled state. I
have looked for a way to override this with little success.

Am I missing something or is the only way to have a ReadOnly ability on
other controls is to code this myself?

Thanks
Dan




Sep 8 '08 #2

P: n/a
There are times when you want to show information within these controls
however the user viewing the data does not have privledges to change. This
would be a good place to simply mark the controls as readonly which allow
the user to view but not change these settings. The developer (me) could
then write the user interface once and only have to mark the fields as
read-only as needed. IF you were to use other controls (textboxes) to
display the current value, now your producing a different UI for each
variation of the screen.

Example:
User A can change any of the values
User B can change all the values on the left side of the screen
User C can change all the values on the right side of the screen.
User D can NOT change any of the values.

4 different levels of permission but setting the correct controls to
readonly would easily handle this.

Does that help it make sense?

Dan

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:35**********************************@microsof t.com...
Dan,

The readonly property makes from a TextBox (with setting the appearance) a
kind of multiline label.

I don't see the purpose of that for a Combobox, a Ceckbox or a
Radiobutton, can you enlighten that missing for me.
In my idea would the use of readonly in these cases only make the customer
to report bugs.

Cor

"Dan Tallent" <sp**@microsoft.comschreef in bericht
news:O$**************@TK2MSFTNGP02.phx.gbl...
>>A textbox has a attribute for ReadOnly. This seems like such a simple
concept. When a textbox is set to read only the user cannot change the
contents of the field.

I have been trying to find that missing ability for other predefined
controls in C#. The radiobutton, checkbox, and combobox controls do not
share this ability. I find it difficult to believe that this feature
was left out and Microsoft expects everyone to write their own
implementation of these controls to handle the missing functionality.

Every control shares the attribute for Enabled. Unfortunately when the
control is rendered it is difficult to read when in a disabled state. I
have looked for a way to override this with little success.

Am I missing something or is the only way to have a ReadOnly ability on
other controls is to code this myself?

Thanks
Dan





Sep 8 '08 #3

P: n/a
On Sun, 07 Sep 2008 20:22:55 -0700, Dan Tallent <sp**@microsoft.comwrote:
[...]
I have been trying to find that missing ability for other predefined
controls in C#. The radiobutton, checkbox, and combobox controls do not
share this ability. I find it difficult to believe that this feature
was
left out and Microsoft expects everyone to write their own
implementation of
these controls to handle the missing functionality.
I always find it difficult to believe when people find it difficult to
believe that something was left out of .NET. :)

There are limits to the functionality that Microsoft can anticipate being
needed as well as that which Microsoft can devote resources to
implementing. People consistently underestimate the cost of even small
things, never mind features that significantly alter the behavior of the
UI.

As well, the functionality you're looking for is inconsistent with
standard UI practices. A read-only control is one that the user cannot
change, and by standard UI practices, that's a disabled control. The
"disabled" state of these controls is exactly the correct behavior when
the user cannot change them.

You'll note that in other applications, even when the controls are
disabled they are often used to display the current state of the control.
It's not really as difficult to read as you seem to think, but more
importantly, the disabled state provides critical feedback to the user as
to why user input on the control doesn't have any effect.

You could probably accomplish what you want, at least to some degree, by
simply watching for state changes and resetting to the desired value.
There's not really any need to rewrite the entire control. But however
you implement this behavior, you do so at your own risk. You're basically
asking to be able to disable a control without showing the user that it's
disabled. If you do that, be prepared for some very annoyed users.

Pete
Sep 8 '08 #4

P: n/a
I always find it difficult to believe when people find it difficult to
believe that something was left out of .NET. :)

There are limits to the functionality that Microsoft can anticipate being
needed as well as that which Microsoft can devote resources to
implementing. People consistently underestimate the cost of even small
things, never mind features that significantly alter the behavior of the
UI.
The feature I'm describing existed in several programming languages and even
extended into application programs like Excel. This concept is not new or
rarely used.
If you don't believe me do a search on google for what I'm describing.
As well, the functionality you're looking for is inconsistent with
standard UI practices. A read-only control is one that the user cannot
change, and by standard UI practices, that's a disabled control. The
"disabled" state of these controls is exactly the correct behavior when
the user cannot change them.
A read-only control by default changes its appearance. A textbox will
change its backcolor to reflect it is non-editable. I am looking for the
exact same principle applied to other common controls. This UI practice
is the standard mechanism for displaying read-only, just look at the textbox
control.

You'll note that in other applications, even when the controls are
disabled they are often used to display the current state of the control.
It's not really as difficult to read as you seem to think, but more
importantly, the disabled state provides critical feedback to the user as
to why user input on the control doesn't have any effect.
As far as the difficulty reading the controls, you must put yourself in the
users position. Not everyone using your application will have perfect
eyesight and will struggle with the distored or faded look of a disabled
control. Do a search.. look this up for yourself if you don't beleive
how often this is a problem.

You could probably accomplish what you want, at least to some degree, by
simply watching for state changes and resetting to the desired value.
There's not really any need to rewrite the entire control. But however
you implement this behavior, you do so at your own risk. You're basically
asking to be able to disable a control without showing the user that it's
disabled. If you do that, be prepared for some very annoyed users.
"disable a control without showing the user that it's disabled"
Not true. I want the same effect as mentioned above that occurs on
textboxes.
With all of that said... I think the .NET framework is a wonderful
achievement, and obviously still growing. I make this post not to attack
MS but to try and find out how they expected us to write our applications
using these tools. I have read hundreds of articles, but these are always
based on how one person interpreted the development tool and is implementing
it within their application. Many of them are trying to write a work
around to this limitation. I am interested in how MS expected us to use
these tools. As I stated in my OP I assumed I was missing something. The
responses I've received so far are more defending MS position rather than
describing an alternate solution to the UI.
I appreciate any help that someone has to offer. I am not trying to
attack anyone, but if you offer an option don't be surprised if it is
questioned. This is the best way for our community to help the product
grow.

Thanks
Dan





Sep 8 '08 #5

P: n/a
Actually, you can place radio button, combo box in a group box, and set the
GroupBox.Enabled=false. This way, the controls inside the group box will
still look as normal, but will not respond user clicks.

However, I have to agree with Cor, this is rather bad way of using controls.
Unless your form or your app prompt the user somewhere clearly that the data
he is viewing on the form is "Read ONly", the use may be very confused when
he is trying to click the "normal-look" controls but get nothing. If you
clearly want to show some read-only information, you have many ways to do it
rather than present it with a confusing controls (look normal but cannot do
anything).

"Dan Tallent" <sp**@microsoft.comwrote in message
news:uu**************@TK2MSFTNGP04.phx.gbl...
There are times when you want to show information within these controls
however the user viewing the data does not have privledges to change.
This would be a good place to simply mark the controls as readonly which
allow the user to view but not change these settings. The developer (me)
could then write the user interface once and only have to mark the fields
as read-only as needed. IF you were to use other controls (textboxes) to
display the current value, now your producing a different UI for each
variation of the screen.

Example:
User A can change any of the values
User B can change all the values on the left side of the screen
User C can change all the values on the right side of the screen.
User D can NOT change any of the values.

4 different levels of permission but setting the correct controls to
readonly would easily handle this.

Does that help it make sense?

Dan

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:35**********************************@microsof t.com...
>Dan,

The readonly property makes from a TextBox (with setting the appearance)
a kind of multiline label.

I don't see the purpose of that for a Combobox, a Ceckbox or a
Radiobutton, can you enlighten that missing for me.
In my idea would the use of readonly in these cases only make the
customer to report bugs.

Cor

"Dan Tallent" <sp**@microsoft.comschreef in bericht
news:O$**************@TK2MSFTNGP02.phx.gbl...
>>>A textbox has a attribute for ReadOnly. This seems like such a simple
concept. When a textbox is set to read only the user cannot change the
contents of the field.

I have been trying to find that missing ability for other predefined
controls in C#. The radiobutton, checkbox, and combobox controls do
not share this ability. I find it difficult to believe that this
feature was left out and Microsoft expects everyone to write their own
implementation of these controls to handle the missing functionality.

Every control shares the attribute for Enabled. Unfortunately when the
control is rendered it is difficult to read when in a disabled state.
I have looked for a way to override this with little success.

Am I missing something or is the only way to have a ReadOnly ability on
other controls is to code this myself?

Thanks
Dan





Sep 8 '08 #6

P: n/a
I'm not suggesting the controls would look normal. The background /
foreground colors would change when read-only just like textboxes do.

How would you display information to a user if they are not permitted to
change it ?

Dan
"Norman Yuan" <Fa******@FakeEmail.Notwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Actually, you can place radio button, combo box in a group box, and set
the GroupBox.Enabled=false. This way, the controls inside the group box
will still look as normal, but will not respond user clicks.

However, I have to agree with Cor, this is rather bad way of using
controls. Unless your form or your app prompt the user somewhere clearly
that the data he is viewing on the form is "Read ONly", the use may be
very confused when he is trying to click the "normal-look" controls but
get nothing. If you clearly want to show some read-only information, you
have many ways to do it rather than present it with a confusing controls
(look normal but cannot do anything).

"Dan Tallent" <sp**@microsoft.comwrote in message
news:uu**************@TK2MSFTNGP04.phx.gbl...
>There are times when you want to show information within these controls
however the user viewing the data does not have privledges to change.
This would be a good place to simply mark the controls as readonly which
allow the user to view but not change these settings. The developer
(me) could then write the user interface once and only have to mark the
fields as read-only as needed. IF you were to use other controls
(textboxes) to display the current value, now your producing a different
UI for each variation of the screen.

Example:
User A can change any of the values
User B can change all the values on the left side of the screen
User C can change all the values on the right side of the screen.
User D can NOT change any of the values.

4 different levels of permission but setting the correct controls to
readonly would easily handle this.

Does that help it make sense?

Dan

"Cor Ligthert[MVP]" <no************@planet.nlwrote in message
news:35**********************************@microso ft.com...
>>Dan,

The readonly property makes from a TextBox (with setting the appearance)
a kind of multiline label.

I don't see the purpose of that for a Combobox, a Ceckbox or a
Radiobutton, can you enlighten that missing for me.
In my idea would the use of readonly in these cases only make the
customer to report bugs.

Cor

"Dan Tallent" <sp**@microsoft.comschreef in bericht
news:O$**************@TK2MSFTNGP02.phx.gbl...
A textbox has a attribute for ReadOnly. This seems like such a simple
concept. When a textbox is set to read only the user cannot change the
contents of the field.

I have been trying to find that missing ability for other predefined
controls in C#. The radiobutton, checkbox, and combobox controls do
not share this ability. I find it difficult to believe that this
feature was left out and Microsoft expects everyone to write their own
implementation of these controls to handle the missing functionality.

Every control shares the attribute for Enabled. Unfortunately when
the control is rendered it is difficult to read when in a disabled
state. I have looked for a way to override this with little success.

Am I missing something or is the only way to have a ReadOnly ability on
other controls is to code this myself?

Thanks
Dan







Sep 8 '08 #7

P: n/a
Dan Tallent wrote:
The feature I'm describing existed in several programming languages
and even extended into application programs like Excel. This
concept is not new or rarely used. If you don't believe me do a
search on google for what I'm describing.
Well, you must be oldtimer.
Nowdays most of people are happy with what M$ provides.
A read-only control by default changes its appearance. A textbox
will change its backcolor to reflect it is non-editable. I am
looking for the exact same principle applied to other common
controls. This UI practice is the standard mechanism for
displaying read-only, just look at the textbox control.
I'm afraid some (younger) people won't understand such concept.
As far as the difficulty reading the controls, you must put yourself
in the users position. Not everyone using your application will
have perfect eyesight and will struggle with the distored or faded
look of a disabled control.
Sometimes I like "cannot be done" approach. Usualy on Fridays, five to
five.
"disable a control without showing the user that it's disabled"
Not true. I want the same effect as mentioned above that occurs on
textboxes.
I had to create a number my own control for ComboBox, the main control
is replaced by a label in ReadOnly state.
In case of RadioButton or CheckBox I used image + label.
Normal buttons are just visible/invisible.

MH
Sep 8 '08 #8

P: n/a

"Dan Tallent" <sp**@microsoft.comwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
I'm not suggesting the controls would look normal. The background /
foreground colors would change when read-only just like textboxes do.

How would you display information to a user if they are not permitted to
change it ?
Without using checkbox or radio button, obviously :)

The thing is, if they aren't allowed to change anything, why even show any
other available options? For example, you may want something like this:

[x] Color tint
(_) Red
(x) Green
(_) Blue

But if user cannot change anything here, then why not just display instead:

"Green tint".

It conveys exactly the same information in a more straightforward manner,
and there's no mistaking that it can't be edited.
Sep 8 '08 #9

P: n/a
Fair enough, but a different user has permission to change this information.
Do you suggest a different interface for each scenario?

dan

"Pavel Minaev" <in****@gmail.comwrote in message
news:O0**************@TK2MSFTNGP04.phx.gbl...
>
"Dan Tallent" <sp**@microsoft.comwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
>I'm not suggesting the controls would look normal. The background /
foreground colors would change when read-only just like textboxes do.

How would you display information to a user if they are not permitted to
change it ?

Without using checkbox or radio button, obviously :)

The thing is, if they aren't allowed to change anything, why even show any
other available options? For example, you may want something like this:

[x] Color tint
(_) Red
(x) Green
(_) Blue

But if user cannot change anything here, then why not just display
instead:

"Green tint".

It conveys exactly the same information in a more straightforward manner,
and there's no mistaking that it can't be edited.

Sep 8 '08 #10

P: n/a
Yea, I've been around awhile. I was expecting this feature to be part of
the core package since it has been around for years.

I appreciate the help.

Thanks
Dan


"Backwater Geezer" <ge****@eu.conwrote in message
news:u4**************@TK2MSFTNGP05.phx.gbl...
Dan Tallent wrote:
>The feature I'm describing existed in several programming languages
and even extended into application programs like Excel. This
concept is not new or rarely used. If you don't believe me do a
search on google for what I'm describing.

Well, you must be oldtimer.
Nowdays most of people are happy with what M$ provides.
>A read-only control by default changes its appearance. A textbox
will change its backcolor to reflect it is non-editable. I am
looking for the exact same principle applied to other common
controls. This UI practice is the standard mechanism for
displaying read-only, just look at the textbox control.

I'm afraid some (younger) people won't understand such concept.
>As far as the difficulty reading the controls, you must put yourself
in the users position. Not everyone using your application will
have perfect eyesight and will struggle with the distored or faded
look of a disabled control.

Sometimes I like "cannot be done" approach. Usualy on Fridays, five to
five.
>"disable a control without showing the user that it's disabled"
Not true. I want the same effect as mentioned above that occurs on
textboxes.

I had to create a number my own control for ComboBox, the main control
is replaced by a label in ReadOnly state.
In case of RadioButton or CheckBox I used image + label.
Normal buttons are just visible/invisible.

MH

Sep 8 '08 #11

P: n/a
On Mon, 08 Sep 2008 05:32:05 -0700, Dan Tallent <sp**@microsoft.comwrote:
[...]
The feature I'm describing existed in several programming languages and
even
extended into application programs like Excel. This concept is not new
or
rarely used.
If you don't believe me do a search on google for what I'm describing.
If there were specific examples, you would mention them by name. I'm
particularly confident that Excel doesn't violate this particular UI
convention in a dialog box, and frankly saying it exists in "several
programming languages" doesn't really make sense, as _none_ of the
mainstream programming languages know anything at all about UI. They all
rely on frameworks or system APIs to present a GUI.

In any case, the question isn't whether it's rarely used or not. It's
whether it's good UI practices, and whether even if it were, it would be
cost-effective for Microsoft to implement it.

I can play the "I've been around awhile" card as well as pretty much
anyone else here. I've been writing GUI code some twenty years, since
before there was even a viable version of Windows around. It's not going
to get you anywhere with me.
>As well, the functionality you're looking for is inconsistent with
standard UI practices. A read-only control is one that the user cannot
change, and by standard UI practices, that's a disabled control. The
"disabled" state of these controls is exactly the correct behavior when
the user cannot change them.

A read-only control by default changes its appearance. A textbox will
change its backcolor to reflect it is non-editable. I am looking for
the
exact same principle applied to other common controls. [...]
And it exists. It's called "disabling the control".

In any case, if you want to present information to the user in a way that
doesn't allow them to change it, but which doesn't look like a disabled
control that would otherwise allow them to change the information, find a
different way to present the information. You don't need to write a whole
new control for the purpose; there are dozens, if not hundreds, of
existing methods of presenting information to the user that don't involve
radio buttons, check boxes, or comboboxes.

Heck, if nothing else, you could just add a Label instance that presents
the current setting for whatever control is disabled.

It's not rocket science. Overloading the behavior of well-known,
well-understood controls is a recipe for user confusion. You claim that
you care about the user? Then don't violate the basic UI behaviors.
Don't introduce unusual, unpredictable behaviors to your application.

Pete
Sep 8 '08 #12

P: n/a
On Mon, 08 Sep 2008 09:05:16 -0700, "Peter Duniho"
<Np*********@nnowslpianmk.comwrote:
>On Mon, 08 Sep 2008 05:32:05 -0700, Dan Tallent <sp**@microsoft.comwrote:
>[...]
The feature I'm describing existed in several programming languages and
even
extended into application programs like Excel. This concept is not new
or
rarely used.
If you don't believe me do a search on google for what I'm describing.

If there were specific examples, you would mention them by name. I'm
particularly confident that Excel doesn't violate this particular UI
convention in a dialog box, and frankly saying it exists in "several
programming languages" doesn't really make sense, as _none_ of the
mainstream programming languages know anything at all about UI. They all
rely on frameworks or system APIs to present a GUI.

In any case, the question isn't whether it's rarely used or not. It's
whether it's good UI practices, and whether even if it were, it would be
cost-effective for Microsoft to implement it.

I can play the "I've been around awhile" card as well as pretty much
anyone else here. I've been writing GUI code some twenty years, since
before there was even a viable version of Windows around. It's not going
to get you anywhere with me.
>>As well, the functionality you're looking for is inconsistent with
standard UI practices. A read-only control is one that the user cannot
change, and by standard UI practices, that's a disabled control. The
"disabled" state of these controls is exactly the correct behavior when
the user cannot change them.

A read-only control by default changes its appearance. A textbox will
change its backcolor to reflect it is non-editable. I am looking for
the
exact same principle applied to other common controls. [...]

And it exists. It's called "disabling the control".

In any case, if you want to present information to the user in a way that
doesn't allow them to change it, but which doesn't look like a disabled
control that would otherwise allow them to change the information, find a
different way to present the information. You don't need to write a whole
new control for the purpose; there are dozens, if not hundreds, of
existing methods of presenting information to the user that don't involve
radio buttons, check boxes, or comboboxes.

Heck, if nothing else, you could just add a Label instance that presents
the current setting for whatever control is disabled.

It's not rocket science. Overloading the behavior of well-known,
well-understood controls is a recipe for user confusion. You claim that
you care about the user? Then don't violate the basic UI behaviors.
Don't introduce unusual, unpredictable behaviors to your application.

Pete
The problem I have is that a ReadOnly textbox is visually very
different from a disabled ComboBox. It is much easier to read. In a
standard Windows installation the foreground and background colors
used in disabled controls are very close to each other, and I get many
complaints about how hard it is to read a disabled combobox.

I prefer to use a ReadOnly textbox instead of disabling it because it
is easier to read and so the user can copy the contents to the
clipboard, but with a mixture of different controls on a form it looks
strange since the comboboxes, checkboxes, etc. are harder to read.

Yes you can argue that this is easily fixable by the user, and that
the disabled comboboxes in my app look exactly like disabled
comboboxes in Windows apps, but in the end relatively naive users
don't care about that and don't want to monkey around with the Windows
display settings. They have trouble reading the comboboxes in my app
so it is my problem.

I have worked around this by adding a readonly textbox for each
combobox and making the appropriate one visible, but doing so is not a
trivial task when the combobox is databound. It would be nicer if
disabled controls weren't so hard to read by default.
Sep 8 '08 #13

P: n/a
"Jack Jackson" <jj******@cinnovations.netwrote in message
news:jg********************************@4ax.com...
On Mon, 08 Sep 2008 09:05:16 -0700, "Peter Duniho"
<Np*********@nnowslpianmk.comwrote:
>>On Mon, 08 Sep 2008 05:32:05 -0700, Dan Tallent <sp**@microsoft.com>
wrote:
>>[...]
The feature I'm describing existed in several programming languages and
even
extended into application programs like Excel. This concept is not new
or
rarely used.
If you don't believe me do a search on google for what I'm describing.

If there were specific examples, you would mention them by name. I'm
particularly confident that Excel doesn't violate this particular UI
convention in a dialog box, and frankly saying it exists in "several
programming languages" doesn't really make sense, as _none_ of the
mainstream programming languages know anything at all about UI. They all
rely on frameworks or system APIs to present a GUI.

In any case, the question isn't whether it's rarely used or not. It's
whether it's good UI practices, and whether even if it were, it would be
cost-effective for Microsoft to implement it.

I can play the "I've been around awhile" card as well as pretty much
anyone else here. I've been writing GUI code some twenty years, since
before there was even a viable version of Windows around. It's not going
to get you anywhere with me.
>>>As well, the functionality you're looking for is inconsistent with
standard UI practices. A read-only control is one that the user cannot
change, and by standard UI practices, that's a disabled control. The
"disabled" state of these controls is exactly the correct behavior when
the user cannot change them.

A read-only control by default changes its appearance. A textbox will
change its backcolor to reflect it is non-editable. I am looking for
the
exact same principle applied to other common controls. [...]

And it exists. It's called "disabling the control".

In any case, if you want to present information to the user in a way that
doesn't allow them to change it, but which doesn't look like a disabled
control that would otherwise allow them to change the information, find a
different way to present the information. You don't need to write a whole
new control for the purpose; there are dozens, if not hundreds, of
existing methods of presenting information to the user that don't involve
radio buttons, check boxes, or comboboxes.

Heck, if nothing else, you could just add a Label instance that presents
the current setting for whatever control is disabled.

It's not rocket science. Overloading the behavior of well-known,
well-understood controls is a recipe for user confusion. You claim that
you care about the user? Then don't violate the basic UI behaviors.
Don't introduce unusual, unpredictable behaviors to your application.

Pete

The problem I have is that a ReadOnly textbox is visually very
different from a disabled ComboBox. It is much easier to read. In a
standard Windows installation the foreground and background colors
used in disabled controls are very close to each other, and I get many
complaints about how hard it is to read a disabled combobox.

I prefer to use a ReadOnly textbox instead of disabling it because it
is easier to read and so the user can copy the contents to the
clipboard, but with a mixture of different controls on a form it looks
strange since the comboboxes, checkboxes, etc. are harder to read.

Yes you can argue that this is easily fixable by the user, and that
the disabled comboboxes in my app look exactly like disabled
comboboxes in Windows apps, but in the end relatively naive users
don't care about that and don't want to monkey around with the Windows
display settings. They have trouble reading the comboboxes in my app
so it is my problem.

I have worked around this by adding a readonly textbox for each
combobox and making the appropriate one visible, but doing so is not a
trivial task when the combobox is databound. It would be nicer if
disabled controls weren't so hard to read by default.

I could not agree more with Jack. The Enabled property would work
perfectly if it were easier to read.
If MS would supply a mechanism to change the disabled forecolor property it
would solve this issue.
You wanted some examples Pete, here you go. This feature is worth doing.

In this article MS talks about how they removed this functionality from VB
http://msdn.microsoft.com/en-us/libr...t2(VS.80).aspx
"Note In Visual Basic 6.0, setting the Locked property to True also
prevents the selection from being changed. You can duplicate this behavior
by canceling the selection in the MouseDown event."

In this article MS talks about how the readonly property works in Visual
Foxpro
http://msdn.microsoft.com/en-us/libr...5b(VS.80).aspx
"The user cannot edit the control."

In this article MS talks about how you can open an Excel workbook as
readonly.
http://msdn.microsoft.com/en-us/libr...ly(VS.80).aspx
Dan






Sep 8 '08 #14

P: n/a
Jack.
and I get many
complaints about how hard it is to read a disabled combobox.
You know what to send to your customers at Christmass.

A screen cleaning set.

:-)

Cor
Sep 8 '08 #15

P: n/a
On Mon, 08 Sep 2008 11:09:07 -0700, Dan Tallent <sp**@microsoft.comwrote:
[...]
You wanted some examples Pete, here you go. This feature is worth
doing.
I disagree. But more importantly, I suspect Microsoft disagrees. You
will just have to live with it.

That said...
In this article MS talks about how they removed this functionality from
VB
http://msdn.microsoft.com/en-us/libr...t2(VS.80).aspx
"Note In Visual Basic 6.0, setting the Locked property to True also
prevents the selection from being changed. You can duplicate this
behavior
by canceling the selection in the MouseDown event."
And? VB was never a shining example of good UI practices. If anything,
the fact that the feature was removed in the transition from VB to .NET
should suggest to you that someone actually put some thought into the
question rather than just blindly copying feature set to feature set.
In this article MS talks about how the readonly property works in Visual
Foxpro
http://msdn.microsoft.com/en-us/libr...5b(VS.80).aspx
"The user cannot edit the control."
Again, FoxPro, not exactly the first place one should go to look for hints
as to best UI practices.
In this article MS talks about how you can open an Excel workbook as
readonly.
http://msdn.microsoft.com/en-us/libr...ly(VS.80).aspx
And this, is completely unrelated to your question. It has absolutely
nothing to do with UI presentation in dialog boxes.

I'd hardly say that you've succesfully demonstrated the supposed
ubiquitousness of this issue. If anything, you've demonstrated that as
the industry moves forward toward better, more-refined UI design, we've
learned our lessons from the past and are distancing ourselves from
user-hostile practices such as presenting ambiguous, misleading UI state.

Pete
Sep 9 '08 #16

P: n/a
"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Mon, 08 Sep 2008 11:09:07 -0700, Dan Tallent <sp**@microsoft.com>
wrote:
>[...]
You wanted some examples Pete, here you go. This feature is worth
doing.

I disagree. But more importantly, I suspect Microsoft disagrees. You
will just have to live with it.

That said...
>In this article MS talks about how they removed this functionality from
VB
http://msdn.microsoft.com/en-us/libr...t2(VS.80).aspx
"Note In Visual Basic 6.0, setting the Locked property to True also
prevents the selection from being changed. You can duplicate this
behavior
by canceling the selection in the MouseDown event."

And? VB was never a shining example of good UI practices. If anything,
the fact that the feature was removed in the transition from VB to .NET
should suggest to you that someone actually put some thought into the
question rather than just blindly copying feature set to feature set.
>In this article MS talks about how the readonly property works in Visual
Foxpro
http://msdn.microsoft.com/en-us/libr...5b(VS.80).aspx
"The user cannot edit the control."

Again, FoxPro, not exactly the first place one should go to look for hints
as to best UI practices.
>In this article MS talks about how you can open an Excel workbook as
readonly.
http://msdn.microsoft.com/en-us/libr...ly(VS.80).aspx

And this, is completely unrelated to your question. It has absolutely
nothing to do with UI presentation in dialog boxes.

I'd hardly say that you've succesfully demonstrated the supposed
ubiquitousness of this issue. If anything, you've demonstrated that as
the industry moves forward toward better, more-refined UI design, we've
learned our lessons from the past and are distancing ourselves from
user-hostile practices such as presenting ambiguous, misleading UI state.

Pete

So Pete,

Now it appears you are no longer claiming the missing feature is because of
lack of resources, but instead a decision made my Microsoft to elimate this
functionality.
If you don't have anything useful to add don't waste everyones time.

Dan


Sep 9 '08 #17

P: n/a
On Mon, 08 Sep 2008 17:51:45 -0700, Dan Tallent <sp**@microsoft.comwrote:
Now it appears you are no longer claiming the missing feature is because
of
lack of resources, but instead a decision made my Microsoft to elimate
this
functionality.
Please feel free to go back and read my original post, since it appears
you've forgotten what points I brought up then.

The question of available resources is a more general one that would apply
in any case, but I also pointed out that in this case, even given
sufficient resources to apply, it's not a feature that should be in .NET
anyway.

I wrote all of that in my very first reply to your question. No "now it
appears" about it.
If you don't have anything useful to add don't waste everyones time.
I never do. But, even if you disagree, no one is forcing you to read my
posts.

Pete
Sep 9 '08 #18

P: n/a
On Mon, 08 Sep 2008 17:51:45 -0700, Dan Tallent <sp**@microsoft.comwrote:
Now it appears you are no longer claiming the missing feature is because
of
lack of resources, but instead a decision made my Microsoft to elimate
this
functionality.
Please feel free to go back and read my original post, since it appears
you've forgotten what points I brought up then.

The question of available resources is a more general one that would apply
in any case, but I also pointed out that in this case, even given
sufficient resources to apply, it's not a feature that should be in .NET
anyway.

I wrote all of that in my very first reply to your question. No "now it
appears" about it.
If you don't have anything useful to add don't waste everyones time.
I never do. But, even if you disagree, no one is forcing you to read my
posts.

Pete
Sep 9 '08 #19

P: n/a
Peter Duniho wrote:
You claim
that you care about the user? Then don't violate the basic UI
behaviors. Don't introduce unusual, unpredictable behaviors to your
application.
This is called "I don't care" approach.
If something is logical and can be achieved why not to implement it?

In your world object heavier than water would not float and transplants
would not exist.

And F-117 plane would not fly as its shape and aerodynamics violate
basic flying rules. Try to guess why despite this F-117 can fly.

MH
Sep 9 '08 #20

P: n/a
"Dan Tallent" <sp**@microsoft.comwrote in
news:O$**************@TK2MSFTNGP02.phx.gbl:
A textbox has a attribute for ReadOnly. This seems like such a
simple concept. When a textbox is set to read only the user cannot
change the contents of the field.

I have been trying to find that missing ability for other predefined
controls in C#. The radiobutton, checkbox, and combobox controls do
not share this ability. I find it difficult to believe that this
feature was left out and Microsoft expects everyone to write their own
implementation of these controls to handle the missing functionality.
Check out the AutoCheck-property for radiobuttons and combobox. Not sure
how you think a read-only combobox should behave. But propably you must
code that yourself.

--
Rune Huseby
Sep 9 '08 #21

P: n/a
On Tue, 09 Sep 2008 01:38:54 -0700, Backwater Geezer <ge****@eu.conwrote:
Peter Duniho wrote:
>You claim
that you care about the user? Then don't violate the basic UI
behaviors. Don't introduce unusual, unpredictable behaviors to your
application.

This is called "I don't care" approach.
If something is logical and can be achieved why not to implement it?
What an odd question. The set of all possible implementations in code is
larger than the set of implementations that are desirable, by trivial
proof. This includes the fact that certain kinds of user interfaces are
counter-intuitive, ambiguous, or just plain frustrating (such as making
your user guess as to the current state of the interface). None of these
kinds of user-interfaces should be implemented, even though they _can_ be.

Saying that if you can code it it's valid makes no sense.
In your world object heavier than water would not float and transplants
would not exist.

And F-117 plane would not fly as its shape and aerodynamics violate
basic flying rules. Try to guess why despite this F-117 can fly.
None of the above make any sense (*), never mind do they have relevance
here.

Ah well...the vagaries of overly-broad cross-posting, I guess.

Pete

(*) floating is about displacement, not weight, _all_ airplanes, including
the F-117, comply with "basic flying rules", and you didn't even bother to
try to qualify "transplants".
Sep 9 '08 #22

P: n/a
Peter Duniho wrote:
alll airplanes, including the F-117, comply with "basic flying rules"
Read

Nighthawk F-117: Stealth Fighter
By Paul F. Crickmore, Alison J. Crickmore

Sep 10 '08 #23

P: n/a
On Wed, 10 Sep 2008 07:08:49 -0700, Backwater Geezer <ge****@eu.conwrote:
>alll airplanes, including the F-117, comply with "basic flying rules"

Read

Nighthawk F-117: Stealth Fighter
By Paul F. Crickmore, Alison J. Crickmore
If the authors claim that the F-117 doesn't comply with "basic flying
rules", then they are wrong. It wouldn't be the first time someone wrote
a book (or a Usenet post) without knowing what they are talking about.

Aerodynamics isn't magic. It's physics. All airplanes use and follow the
same laws of physics. Even the F-117.

Pete
Sep 10 '08 #24

This discussion thread is closed

Replies have been disabled for this discussion.