Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 16th, 2004, 11:02 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: York, , United Kingdom.
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default Disabling VB.Net controls

My eight millionth post so for (writing my first vb.net application!)...

I am disabling some edit controls until the user actually explicitly chooses to edit a particular record. I've set the enabled property of the relevant text boxes to false, however this makes values somewhat difficult to read. I can trap the enter event for the text boxes, however I'm not sure how to cancel the attempt to edit. Does anyone know how to do this?

Thanks v much to all those who are providing me with such a lot of help!

  #2 (permalink)  
Old January 16th, 2004, 11:06 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

This isn't quite the answer you are looking for but...

Instead of disabling an entry box, could you just use a label for the value and a textbox for entry? Show the label in "view" mode and the textbox in "edit" mode.

Peter
------------------------------------------------------
Work smarter, not harder.
  #3 (permalink)  
Old January 16th, 2004, 11:10 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: York, , United Kingdom.
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default

It's ok - I discovered a old thread (http://p2p.wrox.com/topic.asp?TOPIC_...isable,control) that discusses exactly this issue. Thanks again for your help!



Similar Threads
Thread Thread Starter Forum Replies Last Post
vb.net 2008 re: VB.NET databases book bigbearjeff VB.NET 0 June 2nd, 2008 01:22 PM
Enabling/Disabling Form Controls lbyii Javascript 6 October 13th, 2006 07:36 AM
VB.Net question on Windows VB.Net datagrids dmsousa VS.NET 2002/2003 1 January 19th, 2005 02:45 PM
Mouse scroll button in vb controls madhukp VB How-To 0 September 13th, 2004 04:43 AM
vb.net 2002 - vb.net 2003 book metalaaron Wrox Book Feedback 0 August 2nd, 2003 10:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.