Wrox Programmer Forums
|
BOOK: Beginning Visual C#
This is the forum to discuss the Wrox book Beginning Visual C#, Revised Edition of Beginning C# for .NET v1.0 by Karli Watson, David Espinosa, Zach Greenvoss, Jacob Hammer Pedersen, Christian Nagel, Jon D. Reid, Matthew Reynolds, Morgan Skinner, Eric White; ISBN: 9780764543821
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 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
 
Old August 13th, 2003, 02:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default comboBox & ReadOnly

Hi there!
plz tell me how can I Make comboBox ReadOnly! it has no readonly property! should I code for selectedIndexChanged() ???

Always:),
Hovik Melkomian.
__________________
Always,
Hovik Melkomian.
 
Old September 7th, 2003, 01:59 AM
Authorized User
 
Join Date: Jun 2003
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to HuhOiC
Default

Well I checked up on it, and nope, there is no readonly property. I didn't try anything but a simple work around, but inefficient would be to have a OnChanged delegate called which resets the combo box items to it's previous value before the call, and then the user would not notice any difference. But this is just a temporary fix for now. You might want to create your own class derived from this and create a readonly and overload the add to not add it or whatever else you want.

Program or Be Programmed!!!
 
Old October 16th, 2003, 11:53 AM
Registered User
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try only to use the DropDownStyle property with the DropDownList value

Regards.

Be slowly or quickly !!

this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;





Similar Threads
Thread Thread Starter Forum Replies Last Post
Datagridview & combobox column p2pmarit .NET Framework 2.0 1 July 31st, 2006 02:31 AM
ComboBox & ListBox usage venkikrao VB.NET 4 March 14th, 2006 07:50 AM
comboBox & ReadOnly melvik C# 12 February 12th, 2004 01:50 PM
comboBox & ReadOnly melvik C# 2 October 29th, 2003 12:45 AM
ComboBox & related info melvik C# 2 July 5th, 2003 04:53 AM





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