Hello
Hello,
Looking for an ultimate solution to add a suggestion list to a TEdit, I've tried to add a ComboBox under a TEdit...it works pretty well except that for an unknown reason the mouse cursor disappears sometime ?!
Any idea about that ?
https://github.com/tothpaul/Delphi/tree/master/ComboEdit
Looking for an ultimate solution to add a suggestion list to a TEdit, I've tried to add a ComboBox under a TEdit...it works pretty well except that for an unknown reason the mouse cursor disappears sometime ?!
Any idea about that ?
https://github.com/tothpaul/Delphi/tree/master/ComboEdit
Why not just use a TComboBox?
ReplyDeleteStefan Glienke the request is for a general purpose dropdown list on TEdit, TButtonedEdit, etc...
ReplyDeleteI've tried other solutions and the main problem I've found is to add a popup window that do not take the focus and disappears at the right time. ComboBox do that just fine, tha't why I've tried to use it.
Maybe IAutoComplete? stackoverflow.com - How to use IAutoComplete together with TStringsAdapter?
ReplyDeleteFound a hack :)
ReplyDeleteAlexander Sviridenkov I'v seen that, but with a ComboBox you can use custom draw items
ReplyDelete;)
So, what's the hack you found Paul TOTH ?
ReplyDeletehttps://github.com/tothpaul/Delphi/blob/master/ComboEdit/Execute.ComboEdit.pas#L104
ReplyDeleteI still don't understand what you're after. Any existing application having similar behaviour?
ReplyDeleteComboBoxes are strange things as the dropdown doesn't belong to the normal control hierarchy. I think that in the past it belonged to the desktop. Not sure about now.
ReplyDeleteAttila Kovacs with a dropdown that is not clipped by the parent control, that's why I use it.
ReplyDeleteBTW WM_SETCUSOR works also, you're right.
It's a Windows bug :)
ReplyDeletehttps://support.microsoft.com/en-us/kb/326254
Oh, yes! I remember! I implemented a mouse-move on drop-down. Moved the mouse pointer a couple of pixels to the right (for ltr). Users were happy with that.
ReplyDeleteYou can have a look at tmssoftware.com - TMS Software
ReplyDeleteNancy Lescouhier Hello Nancy, you ask, so I reply. TMS provide a very large set of components to do a lot of things. That's great.
ReplyDeleteBut each time I have to use one of your components, I have to deal with a plethora of properties that I don't need.
I've just downloaded the trial to try the TAdvSearchEdit component.
the component has a black background (?!), they're 3 buttons that I have to hide. there's no Items:TStringList property to provide the items but a collection of TSearchItem with a Columns collection of TSearchCollumnItem (ouch !)
This component can probably achieve the requirement, but I feel like using a slegehammer to stick a nail (not sure of the translation :D).
Paul TOTH For the black color, set FocusColor = clNone (or clWhite or any other color you want) As this component can do lookup in multiple columns, have images associated, we can't use a simple stringlist, this is the reason for the collection. Strings can be easily added to the collection though if you have only a single column.
ReplyDeleteBruno Fierens yes Bruno, that's what I say, I don't need all this features, but they are probably welcome for other needs ;)
ReplyDeletePaul TOTH Understood, always very hard to make a balance. Would it help if we added a method AddStrings(s: TStrings) that gives you one call to simply load singe column values from a stringlist?
ReplyDeleteBruno Fierens thanks but I'm prefer virtual contents. My visual component needs to be as light as possible with a lot of OnPaint events. I'm not a good candidat for your sophisticated components ;)
ReplyDelete