Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

read-only forms: grey on grey is sub-optimal

Status
Not open for further replies.

misterstick

Programmer
Apr 7, 2000
633
GB
what would you say is a good way of showing the user that the data on a form is read-only?

i'd rather not use [tt]Enabled=False[/tt], since this sets controls to be grey on grey, which can be very hard to read.

[tt]ReadOnly=True[/tt] would be useful, but this is only a property of a TextBox.

i've tried extending UserControl to include a ReadOnly property. this walks the contained controls turning them on or off as necessary. however, this hits the problem of what to do with controls that aren't TextBoxes.

MTIA,

mr s. <;)

 
is the problem that i'm trying to do to much at once, then?

i want the user to use the same form to edit and view data.

i like the idea that a form can be made display only via a single property.

enabled would work, but as i said, grey on grey is difficult to read.

should i replace all my controls with a derivation of UserControl that either display a data control or a label depending on a ReadOnly proprty?

that seems a lot of work.

wouldn't it introduce a slight overhead, too?



mr s. <;)

 
make a custom control that when "Read Only" it displays a label and when not read only - it displays a textbox.

Should be fairly simple
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top