Lost Password?


  #1 (permalink)  
Old 07-13-2006, 07:35 PM
Crane's Avatar   
Crane Crane is offline
Programming Expert
 
Join Date: Nov 2005
Posts: 399
Rep Power: 14
Crane is on a distinguished road
Default Disable typing in combobox

I would like to disable typing in a combobox without disabling the control. The user would still be able to use the drop-down list but would not be able to type.

How?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-14-2006, 10:17 AM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

This isn't so hard. You have to capture the keypress event for that control.

Code:
private: System::Void comboBox1_KeyPress(System::Object^  sender, System::Windows::Forms::KeyPressEventArgs^  e) {
			 e->Handled = true;
		 }
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-14-2006, 11:47 AM
Crane's Avatar   
Crane Crane is offline
Programming Expert
 
Join Date: Nov 2005
Posts: 399
Rep Power: 14
Crane is on a distinguished road
Default

Thanks lop, works perfect
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-15-2006, 11:28 AM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

No problem!
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-23-2008, 06:49 PM
SpaceGhost SpaceGhost is offline
Newbie
 
Join Date: Sep 2008
Posts: 1
Rep Power: 0
SpaceGhost is on a distinguished road
Default Re: Disable typing in combobox

You have to do this:

myComboBox.DropDownStyle = ComboBoxStyle.DropDownList;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable typing in a combo box Chan C# Programming 5 09-26-2008 08:51 AM
Disable a button reachpradeep ASP, ASP.NET and Coldfusion 1 03-03-2007 03:35 PM
Disable cap Lock at login screen? Lop C# Programming 0 01-25-2007 09:18 AM
C# to disable a device NeedHelp C# Programming 4 07-24-2006 03:34 PM
Howto: Populate info into combobox dirkfirst C# Programming 3 07-05-2006 08:40 PM


All times are GMT -5. The time now is 05:54 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads