Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Assuming your log is 1,000,000 lines long you can forget using HTML or RTF, the cleanest solution (and I handle 100-1,000,000)is to use (as mjustin suggests) a TListBox with </p> <pre><code>Style := lbVirtualOwnerDraw; OnDrawItem := ListDrawItem; // your own function (example in help file) </code></pre> <ol> <li>Define your data array in whatever format is useful for the rest of the application. I go with a simple LogObject.</li> <li>Store all the LogObjects in a ObjectList, everytime there is an change to the list (add, remove), adjust the TListBox.Count to match the new ObjectList count.</li> <li>Define ListDrawItem yourself to take the index and you can get the information from youe ObjectList (database, whatever..) and parse on demand. </li> </ol> <p>Because you will only be viewing a few entries at a time, the "on demand parsing" approach is significantly better as there is no "slow down" at load time as you try to parse all million lines.</p> <p>Not knowing your actual problem I can just say that in my experience this is a technique that once learned and mastered is useful in most data oriented application. </p> <p>Enhancements include attacheing a header control above the list box (I wrap them together in a panel) and you can create a superior TListView Control. Attach a bit of sort logic to the click event on the header control and you can sort your object list and all you have to do is call ListBox.Invalidate to refresh the view (when it can).</p> <p>++ For realtime updating. I do this at the moment, is to trigger a timer event to adjust the ListBox.Count as you don't want to update the listbox 1000 times a second.. :-)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload