Delphi Search Edit Component - delphi

I need a delphi component for Delphi 2007 win32 that have features like Google search text box.
** While User writing search key it should fill/refresh the list with values, and user can select one of them.
**User can go up and down list and can select one of them.
**List should contain codes and text pair, so user can select text and I can get code for database operations.
(Google can highlight the search text in List but I think it is not possible with Delphi 2007, so it is not expected.)
I tried Dev Express TcxMRUEdit, however it doesn't meet my needs

Since you have DevExpress, why don't you try the cxLookupComboBox in lsEditMode and with ImmediateDropDown = True?

Check out woll2woll components. The TLookupcombobox has done this since Delphi 3 (or earlier). This is not spam, I just use the library.
http://www.woll2woll.com/

I also had the same problem and unfortunately didn't find a suitable component. I was also inspired from google.
So it turned out to be easier for me to "simulate a component" by using an editbox and a grid placed under it. As the user types something in the editbox the query refreshes and the proper resulst are shown in the grid. I have many columns in the grid, the query results try to match all the fields (so if I type 'po', the query will return all records where any field is like 'po%'). I also added a delay of 500ms after the user types to avoid to run too many unnecessary queries (another aproach could be to kill the thread as the user strikes a new key, if the query is run in a thread).
In this way I obtained the required functionality, even if without higlighting the search text, anyway my users are delighted by this.
In every place I am using this "component" I am attaching a query at runtime so it can be used in many different forms.
I somehow was also inspired by the skype UI: when you display the lsit of contacts you can type something and the contacts will be filtered accordingly (skype uses an editbox + grid/listbox).

Related

GroupFooter from FastReports not getting data using DBX instead of ADO in delphi

Since I don't want to use ODBC connections anymore, I'm trying to get DBX work for my reports. Almost everything works the same as it worked with the tfrxAdoQuery, but not the GroupFooter.
I used to have a MasterData that used a ADOQuery1: TfrxAdoQuery and I changed to a DBXQuery1:TfrxDBXQuery. Its fields like [BDXQuery."name"] work fine now than I'm using a different type of query, but only inside the MasterData. This is the way it looks in the MasterData and when the report is displayed it comes correctly:
For some reason, the Footer's tfrxMemoViews dont show the DBXQuery1."anyField" that I try to display.
This is the way it looks in the footer but in the report just dont show the name.
The difference is the DatasetName can't be set for the DBXQuery (as it was set when using the ADOquery). When I was using ADO, the DatabaseName seem to be assinged arbitrarilly with a name like 'header' which did not belong to any component or variable. Now it should be more manageable since the fields that are set are DataSet (wich can be chosen from a group that has all the DataSets, in my case I can choose DBXQuery1) and DataField, which can be chosen from one of the predetermined fields that are in the DBXQuery1.
Any help will be highly appreciated

Search in Content and skip html elements in mvc

I want to search in content and I don't want to get fault result.
assume users search 'br' I don't want to see in output results that have <br> or <P> and other html elements
Simply, you must strip the tags before you search. However, that would mean not being able to query the database directly. Rather, you'd have to pull all the objects first, and then query the collection in memory.
If you're going to be doing a lot of this or have large collections of objects (where pulling all of them for the initial query would be a performance drag), then you should look into a true search solution. I've been working with Elasticsearch, which seems to be just about the best out there in my opinion. It's easy to set up, easy to use, and has third-party .NET integration through the nuget package, NEST.
With a true search solution, you can index your content fields, stripped of HTML, and then run your queries on the index instead of directly on your database. You'll also get powerful advanced features such as faceting, which would be difficult or impossible to do directly with Entity Framework.
Alternatively, if you can't go full board on the search and it's unacceptable to query everything up front (which really it pretty much always is), then your only other option is to create another companion field for each HTML content property, and always save a HTML-stripped copy of the text there. Then, use that field for your search queries.

Directly modify a specific item in a TKinter listbox?

This is one of those just-making-sure-I-didn't-miss-anything posts.
I have a TKinter GUI in Python 2.7.3 that includes a listbox, and there are circumstances where I'd like to directly modify the text of a specific item at a known index. I've scoured the documents and there's no lb.itemset() method or anything like it. As best I can tell I have two options, either of which would work but just seem kind of klunky to me:
lb.delete() the old item and lb.insert() the new value for it at the same index (including a step to re-select the new value if the old deleted one happened to be selected).
Create a listvariable for the listbox, then use get() and set() on it -- with a pile of replace/split/join acrobatics in between to handle the differing string formats involved.
Is there some simpler, more direct way to do it that I'm missing? Or have I turned up all the available options?
Assuming from silence that there's nothing I missed. I went with option 2 -- the acrobatics weren't quite as complex as I'd thought. I just created a behind-the-scenes list wrapped up in a class; every time I update the list, the class syncs up the content of the listbox by doing a ' '.join on the list then setting the listbox's listvariable to the resulting string.

Access 2010 form not displaying query

I'm sure this is an easy fix but I can't seem to find it. I just have a form, that will be a subform of another, that needs to display the results of a query.
The query is simple enough, just displays all fields of records that fall between specified dates. The query works great, but when I attach it to the form as its record source it doesn't display the data. I can see the correct amount of record selectors so I know its understanding the query but its as if all fields are hidden!
I have also tried building a query to the forms record source that was simply Select query.* From query. Oddly I have had this working before but I had to specify every field. What I mean is:
Select title From query
Select type From query
Select date From query
...
And so on for all the fields but this seems foolish, can anyone think of what I may be doing wrong?
Thanks in advance!
Edit, forgot to mention I also tried the foolish solution that I mentioned above and it didn't work so its definitely some issue that I'm not seeing, some property that's probably not appropriately set
#sshekhar well its not really code at the moment I'm using Access 2010. I have a form that needs to display a subform that executes this query of displaying records that have a data field that fall between dates specified by the user. The query works and displays the correct records, but the form that it is attached to only shows the record selectors and all the fields appear to be "hidden." I thought it may be one of the form's properties set incorrectly but I checked on the test form from another database that I used and each have what appears to be identical settings. So I'm at a loss!
So it turns out even though I using a query that holds all the fields it will not display the content unless you go to the Add Existing Fields and add all the the fields you want to see. This seems really silly especially when the results in the query but at least its working now.
I had this problem and discovered that having the property DataEntry set to YES will only display new records. From Microsoft Help:
You can use the DataEntry property to specify whether a bound form
opens to allow data entry only. The Data Entry property doesn't
determine whether records can be added; it only determines whether
existing records are displayed. Read/write Boolean.

Delphi: Multiple tokens edit component

I'm looking for an enchanced edit component that allow users to input multiple tokens (items) manually separated by some symbol, or to select them from another source.
It's something like "TO" field in outlook or facebook that allow you to input multiple recipients.
Can anyone suggest any solution?
The way we sort of do it is to use an normal button edit box and when the user clicks the button we present a separate form (which can be made to look like a drop down box if you like) with a checklist or listview with checkboxes enabled or similar. The user selects any number of the items then when the form closes we take the list of selected items and present them in the edit as a comma or semi-colon separated list. The edit itself is read-only so all interaction goes through the separate form.
But - I really don't like the whole approach (for our app) as it doesn't look good when you have many selected items and I'm looking to find a better way of showing the selection! I suppose one option is to use a read-only memo with scrollbars to show the items.
TMS has some nice components, one of which is the TCheckListEdit which might be of use.

Resources