Print Page | Close Window

[Question] Combobox control

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=17951
Printed Date: 28 April 2024 at 1:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [Question] Combobox control
Posted By: DataCrypt
Subject: [Question] Combobox control
Date Posted: 23 February 2011 at 10:23pm
What is the "DataChanged" property of the Combobox?  I don't find it documented in the help and it seems to always be false!  It would be nice if I new that the data actually changed if the user clicked on an item (and if that item was already chosen - then it didn't really change).  So, if they pick something different then the DataChanged=True and if they pick the same item then DataChanged=False.

Also, I have a request for the combobox:

Please allow "AutoComplete" with the dropdown is a DropDownList.  I would like the user to be able to type in the combobox and have it select the closest match in the list and yet NOT be able to type anything that is not contained in the dropdown list.  This is very helpful when selecting from a large list of countries.  They can start typing and select the item rather than just going off the first letter as it works today.

Best Regards,

DataCrypt



Replies:
Posted By: Oleg
Date Posted: 24 February 2011 at 1:18am
Hi,

DataChanged is some auto generated event that VB (.NET?) adds. we don't have it in our odl.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: DataCrypt
Date Posted: 24 February 2011 at 12:37pm
Thank you Oleg. Smile

I ended up just declaring a static variable (in the combobox click event) and setting it equal to the current combobox text, such that when a user clicks on an item, I can compare the "currently selected value" against the static variable (holding the previous value) to know if the item they clicked on is the same as what was already chosen (displayed) or a new list item.  Naturally if the values are different, I update the static variable.

I designed my own combobox a while back in where I gave myself some properties/methods that I found to be very helpful in coding.  However, I'm looking to replace its usage in an older program with your combobox control from the Xtreme Suite controls. I think it will be faster and offers the theme look.

Some of the useful properties I had in my custom combobox were:

combobox.PrevListIndex - this returned the ListIndex of the previous item that was selected
combobox.SetText - this set the text in the combobox without firing the Click or Change event (unlike the normal .Text method).

Perhaps these may be implemented into yours sometime in the future.  I do not believe they are difficult to add to achieve the same goals (if others would also find them useful).

Best Regards,

DataCrypt





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net