Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 December 4th, 2007, 01:01 AM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Customising the combo box

Hi,
We have a combo box in our application whose drop down style is set to 'Default'. The user is allowed to type into the combo box at runtime and when the form is saved, the new entered value is saved in the form object. The combo box is also populated by a existing set of options and we finally add the value entered by the user as the combo box text. The problem we face is that when the form is opened, the combo box text is high lit. As a result of this, there are two controls in the form which seem to have focus, the selectable control with the lowest tab index, and the combo box. We need to disable the highlighting in the combo box when the form opens. Any suggestions?
Thanks for your time.

 
Old December 4th, 2007, 08:36 AM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In addition to the previous post, please note that it is a Winforms application. It is to work on Win2K OS.
One of the solutions that was implemented and failed was handling the GotFocus and LostFocus events. In the GotFocus event handler, the drop down style was made 'Default' and in the LostFocus event handler, the drop down style was 'DropdownList'. (This works if the user does not then try to access the control :D).Whenever the user clicked on the drop down button, the application shut down.

Thanks for reading through. Hope you can help me.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate a text box from a combo box value dnf999 Access VBA 7 February 6th, 2012 02:24 PM
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM





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