Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/19/23 in all areas

  1. I have just finished the first (sort of) working version of a new Grep Expert in GExperts. My working title for it is "Fast Grep", but I don't really like that. Perhaps you can suggest a better name? It does the following: It opens a new (dockable) window in which you can enter a regular expression. As you type (with a short delay after the last keystroke), it runs the RegEx on the current editor window. It then displays a list of all matches in the window, giving the filename, line number and some context (I took this code from the Bookmarks Expert). You can then use the up/down arrow keys to scroll through these matches. While you do that the cursor in the editor window will move to the row/column of the currently selected entry. Pressing Enter closes the Fast Grep window and your cursor will end up at the selected match position. Pressing Esc will also close the Fast Grep window and move the cursor back to where it was when you started Fast Grep. The current source code in svn already contains this functionality, just in case you want to check it out. Beware that this is a work in progress and pretty much untested!
  2. Remy Lebeau

    Using bold text in Listview

    Rather than using a separate class in the TListItem.Data property, it would be safer and more efficient to derive a new class from TListItem and add whatever members you want to it, and then return that class type from the ListView's OnCreateItemClass event. You can then type-cast any TListItem in the ListView to your custom class type when needed, and you don't have to worry about freeing them manually. For example: type TMyListItem = class(TListItem) public BoldText: Boolean; end; procedure TForm8.ListView1CreateItemClass(Sender: TCustomListView; var ItemClass: TListItemClass); begin ItemClass := TMyListItem; end; procedure TForm8.ListView1AdvancedCustomDrawSubItem(Sender: TCustomListView; Item: TListItem; SubItem: Integer; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean); begin if TMyListItem(Item).BoldText then Sender.Canvas.Font.Style := [fsBold]; end; ... var li := ListView1.Items.Add; TMyListItem(li).BoldText := True; Of course, in this particular example, there is a much simpler solution - just look at the data being drawn and act accordingly, eg: procedure TForm8.ListView1AdvancedCustomDrawSubItem(Sender: TCustomListView; Item: TListItem; SubItem: Integer; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean); begin if (SubItem > 0) and (StrToInt(Item.SubItems[SubItem-1]) < 0) then Sender.Canvas.Font.Style := [fsBold]; end;
  3. Uwe Raabe

    New Grep Expert in GExperts - need a name

    My list - with increasing nerd factor: Instant Grep Grepility Greppo
  4. aehimself

    Querying mvnrepository

    In your browser it works because there are some JavaScript generating / fetching the data from somewhere else with your browser happily renders. You’ll need TEdgeBrowser or something similar to actually render it for you and then process the visible document.
  5. Rollo62

    multiple developer (iOS) accounts

    Delphi pulls the account info from XCode via PAServer, so if XCode can handle several accounts, then Delphi can do it too. Yes, to have different developer accounts works for me, but you have to take care that you switch all provisioning profiles and BundleID's correctly. To have even one account can be enerving enough, but that not a Delphi issue, it comes from the Apple side.
×