Other Bits

Drop-Down Controls

While working on Timekeeper 3.0, I ran across the need for a treeview dropdown. After some searching, I ran across Brad Smith's control. I tried it out and on the surface it looked like exactly what I wanted. However, it was missing one important feature: from the keyboardist's point of view, it did not respond like normal combobox and treeview components would. Missing:

My goal was to make this mimic expected combobox and treeview control behavior as much as possible.

In a comment, Gavin added simple auto-complete functionality. While it certainly worked, it didn't reproduce actual combobox behavior. Differences:

In my implementation, every keypress does two things: 1) appends the keystroke to the existing search string and 2) begins searching immediately. With each keypress the timer is reset and when 1000ms (without a keypress) has passed, the search string is reset. (The timer is also reset for non-keypress navigation events, such as Home, End, etc.) Further, it begins searching from the currently selected node as well as only searching visible data. Items in a collapsed node are not eligible for auto search.

Download

This download requires Brad Smith's sources. I have only provided updates to ComboTreeBox.cs and ComboTreeDropDown.cs.

ComboTreeDropDownEnhancements.zip

Disclaimer

This software is provided AS IS without warranty of any kind, express or implied. To the maximum extent permitted by applicable law, in no event shall Lockshire Media LLC or Charlie Hills be liable for any lost profits, revenue, sales, data, or costs of procurement of substitute goods or services, property damage, personal injury, interruption of business, loss of business information, or for any special, direct, indirect, incidental, economic, cover, punitive, special, or consequential damages, however caused and whether arising under contract, tort, negligence, or other theory of liability arising out of the use of or inability to use the software.

Copyright © 1999-2014 by Charlie Hills. All Rights Reserved.
Technitivity is a Very Tiny Division of Lockshire Media, LLC.