﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Prevent user from typing in Combobox/ComboBoxEdit...</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 12 Jun 2026 09:23:07 GMT</lastBuildDate><ttl>20</ttl><item><title>Prevent user from typing in Combobox/ComboBoxEdit...</title><link>http://forum.strataframe.net/FindPost8982.aspx</link><description>My question is about a ComboBoxEdit, which is the SF wrapped version of a DevExpress LookUpEdit, however it would be nice to know the answer to this question for a regular SF Combobox also. ;-)&lt;br&gt;
&lt;br&gt;
How can I allow the user to type in a ComboBoxEdit so that it suggests related items as they type but prevent them from typing in something that isnt in the list?</description><pubDate>Wed, 23 May 2007 13:37:48 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Prevent user from typing in Combobox/ComboBoxEdit...</title><link>http://forum.strataframe.net/FindPost8991.aspx</link><description>You'll have to override the OnKeyDown method of the control and search do your searching based upon the current text plus the new character.&amp;nbsp; If a match is found, then narrow your list and allow the OnKeyDown to proceed.&amp;nbsp; However, if a match is not found, then set the appropriate e.Handled and e.SuppressKeyPress properties on the event args and bail (don't even call the base.OnKeyDown() because you don't want the event to be raised because you don't want to allow the keypress).</description><pubDate>Wed, 23 May 2007 13:37:48 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>