delphi-xe7

Highlight specific text in DBGrid

穿精又带淫゛_ 提交于 2021-02-04 19:25:09
问题 I'm performing a query and displaying returned data in dbgrid. I would like to highlight the items matching the search criteria. Something like: Search by : " test " In DBGrid, returned data would be . ID Return 1 This is a **test** 2 **Test**ing The goal here is no doubt about querying data. But how to highlight specific text in DBGrid? Important: only the specific part of the text should be highlighted. NOTE: The information presented is to make it clear, not corresponding exactly to

Adding non class functions to generic TArray class

和自甴很熟 提交于 2021-01-28 20:35:59
问题 In System.Generics.Collections , the TArray type has class functions only. For example: class procedure Sort<T>(var Values: array of T); overload; static; This implies the only accepted syntax is the following: var Arr : TArray<integer>; begin SetLength(Arr, 2); Arr[0] := 5; Arr[1] := 3; TArray.Sort<integer>(Arr); end; I would like to define an object's function in order to sort the values of the generic array using the following syntax: var Arr : TArray<integer>; begin SetLength(Arr, 2); Arr

TMediaPlayer Error - Unsupported Media File

﹥>﹥吖頭↗ 提交于 2021-01-28 03:23:19
问题 I am trying to play a mp3 file from Firemonkey XE7 windows application. It should have been a simple task by putting a TMediaPlayer component, assigning it a .mp3 file, and just playing it. However, I get the following error: Application Error Exception EReadError in module MediaPlayerTest.exe at 00000000000012139E. Error reading MediaPlayer1.FileName: Unsupported media file testfile.mp3. I have also tried .wav, and it didn't work either. (Audio codec have already been installed and the media

TDirectory.GetDirectoryRoot does not handle correctly paths of Max_Path characters

一笑奈何 提交于 2021-01-27 17:51:10
问题 IOUtils.TDirectory.GetDirectoryRoot(Folder) gives me an error when 'Folder' is 259 chars long (yes, it includes the \ separator at the end): Project Tester.exe raised exception class EPathTooLongException with message 'The specified path is too long'. I though that I can use up to 260 chars in paths. Why GetDirectoryRoot does not accept paths that are of Max_Path chars? 回答1: And this is why: class procedure TDirectory.InternalCheckDirPathParam(const Path: string; const ExistsCheck: Boolean);

Delphi XE LiveBindings - Bits to Byte

十年热恋 提交于 2021-01-27 12:43:20
问题 I just discovered livebindings with Delphi. And created my first components for handling a control-word for a frequency converter. The component it self seems to work well testing it in the form designer. However, compiling and running the application things doesn't work. Screenshot from livbindings like this: And here is the code for the component unit cBits2Byte; interface uses System.SysUtils, System.Classes; type TBits2Byte = class(TComponent) private { Private declarations } fBit00,

Launch HTML Help as Separate Process

匆匆过客 提交于 2020-08-10 03:44:53
问题 I am using XE7 64 and I am looking for a strategy to solve several problems I am having when displaying HTMLHelp files from within my applications (I have added the HTMLHelpViewer to my uses clause). The issues are the following: 1) Ctrl-c does not copy text from topics; 2) The helpviewer cannot be accessed when a modal dialog is active. The source of the problems are presumably attributable to the htmlhelpviewer running in the same process as the application. Is there a way to have the built

Launch HTML Help as Separate Process

余生长醉 提交于 2020-08-10 03:44:01
问题 I am using XE7 64 and I am looking for a strategy to solve several problems I am having when displaying HTMLHelp files from within my applications (I have added the HTMLHelpViewer to my uses clause). The issues are the following: 1) Ctrl-c does not copy text from topics; 2) The helpviewer cannot be accessed when a modal dialog is active. The source of the problems are presumably attributable to the htmlhelpviewer running in the same process as the application. Is there a way to have the built

What are the implications of using Canvas.TextOut?

谁说我不能喝 提交于 2020-07-17 09:30:16
问题 Introduction My question comes from a rather interesting problem I have been dealing with for the past few days. I recently asked a question regarding Writing a custom property inspector - How to handle inplace editor focus when validating values? I have since made some nice progress with my control such as adding a divider in the middle to separate between Name and Value rows, and importantly the divider can be used to resize the two columns. Here is where my problems started, having the