Unit scope names:
Making sure you have the right unit scope names setup in your projects or sample projects |
If you get an error that a standard Delphi unit in the uses list of your project or our sample projects are not found, for example: An error message '[dcc32 Fatal Error]: F1026 File not found: "C:\Program Files(x86)\tmssoftware ... Registry.dcu' appears when compiling a TMS Demo project, this most likely indicates the unit scope names are not setup correct in the project. When a project file contains no unit scope names, the IDE initializes the unit scope names of the project to the default unit scope name list. Sometimes, this default list is incorrect and some unit scopes are missing. In this case, add the appropriate unit scope name:
|
You can easily have a radiobutton-like behavior in THTMLCheckList by adding the following event handler for OnCheckClick: procedure TForm5.HTMLCheckList1CheckClick(Sender: TObject; Index: Integer); begin HTMLCheckList1.UnCheckAll; HTMLCheckList1.Checked[Index] := true; end; |
TAdvStringGrid:
How to handle the event of changing the combobox from the TColumnComboEditLink component in a TAdvStringGrid |
Following code with a TAdvStringGrid and a TColumnComboEditLink on the form demonstrates how you can handle the ComboChange event: procedure TForm1.AdvStringGrid1GetEditorProp(Sender: TObject; ACol, ARow: Integer; AEditLink: TEditLink); begin ColumnComboEditLink1.Combo.OnChange := ComboChange; end; procedure TForm1.AdvStringGrid1GetEditorType(Sender: TObject; ACol, ARow: Integer; var AEditor: TEditorType); begin AEditor := edCustom; AdvStringGrid1.EditLink :=ColumnComboEditLink1; end; procedure TForm1.ComboChange(Sender: TObject); var cc: TColumnComboBox; begin cc := Sender as TColumnComboBox; advstringgrid1.Cells[0,0] := inttostr(cc.ItemIndex) + ':'+ cc.ComboItems.Items[cc.ItemIndex].Strings[0]; end; |
To allow an easy customization of what columns to show in a grid by the user, an often used user interface is a list holding the available columns and allowing the user to drag & drop from the grid the columns that should be hidden or drag columns that should be displayed from the list to the grid. To achieve this functionality, a component is offered that integrate much of this functionality: TAdvGridHeaderList. The TAdvGridHeaderList is a listbox-style control that holds indexes of available (hidden) columns. By means of drag & drop from the column header to the list and vice versa, it is possible to define what columns to show or not show in the grid. Here you can download a demo that shows how you can initialize a TAdvGridHeaderList with hidden columns |
You can do this with: grid.SearchPanel.EditControl.SetFocus; |
TADVGridExcelIO:
How to set the Decimalseparator when exporting a grid to Excel with GridExcelIO.XLSExport |
For numbers, what you see in Excel depends on what you have configured in Excel. The numbers are by default exported as doubles, not strings, so there is no “,” or “.”. By default Excel uses whatever your machine settings are to display the file: So if the machine in China has Excel configured to use “.” as decimal separator, it should show as “.” You can also override the setting from Excel itself. For example, in my Spanish Excel I see “,” as decimal separator: But if I go to File->Options->Advanced and change the setting: Now Excel will show the same file as: This setting (show a . or a ,) is not stored in the file anywhere, this is a setting of Excel itself. So, if you are exporting as numbers (which is the best idea), then you should see whatever the user has configured in his machine. I would recommend that you export numbers as numbers, not strings. This will ensure the numbers show in the user locale. To do this, just comment the line “ExportCellFormats := false”. This code: begin aGrid.Floats[1, 1] := 3.4; GridExcelIO.GridStartCol:= 0; GridExcelIO.GridStartRow:= 0; with GridExcelIO.Options do begin //ExportCellFormats:= false; ExportCellProperties:= false; ExportCellSizes:= true; ExportWordWrapped:= true; ExportOverwrite:= omAlways; end; GridExcelIO.AdvStringGrid:= aGrid; GridExcelIO.XLSExport('r:\Test.XLS', 'Test'); end; aGrid.FormatType := ftExcel; begin DecimalSeparator := '.'; aGrid.Floats[1, 1] := 3.4; aGrid.FormatType := ftExcel; GridExcelIO.GridStartCol:= 0; GridExcelIO.GridStartRow:= 0; with GridExcelIO.Options do begin ExportCellFormats:= false; ExportCellProperties:= false; ExportCellSizes:= true; ExportWordWrapped:= true; ExportOverwrite:= omAlways; end; GridExcelIO.AdvStringGrid:= aGrid; GridExcelIO.XLSExport('r:\Test.XLS', 'Test'); end; begin aGrid.Floats[1, 1] := 3.4; DecimalSeparator := '.’; aGrid.FormatType := ftExcel; GridExcelIO.GridStartCol:= 0; GridExcelIO.GridStartRow:= 0; with GridExcelIO.Options do begin ExportCellFormats:= false; ExportCellProperties:= false; ExportCellSizes:= true; ExportWordWrapped:= true; ExportOverwrite:= omAlways; end; GridExcelIO.AdvStringGrid:= aGrid; GridExcelIO.XLSExport('r:\Test.XLS', 'Test'); end; In general, you should change the decimalseparator at the start of the app or somewhere like that. But as said, if you export as numbers instead of as strings, there shouldn’t be any issues. |
If you deployed under C:\Program Files (x86)\ there is no other choice than deploying this as application components (i.e. files should be in CAB and CAB should be listed under appcomps=... in the WebUpdate .INF control file) as typically, your installed app isn’t running with admin permissions to be able to write under the protected \Program Files folder. |
As soon as you add the LocalAuthentication component, you are bound to iOS 8.0. The component already internally checks if authentication is possible before executing it. There is currently no separate verification but if you want to verify if TouchID is available you can use the following code (it requires the FMX.TMSNativeUICore unit) function TForm1.TouchIDAvailable: Boolean; var ctx: LAContext; error: PPointer; auth: NativeInt; begin result := False; ctx := TLAContext.Wrap(TLAContext.Wrap(TLAContext.OCClass.alloc).init); error := nil; auth := LAPolicyDeviceOwnerAuthenticationWithBiometrics; if ctx.canEvaluatePolicy(auth, error) then Result := True; ctx.release; end; |
TTMSFMXCloudFaceBook:
When connecting to FaceBook, I get an error similar to: "The URL entered is not permitted by the application configuration." |
Please make sure the “Embedded browser OAuth login” is enabled in your app:
|
The TMS Chart for FireMonkey includes a simple animation mode to animate the series from 0 values to the values that are added or vice versa. The AnimationFactor and AnimationFlow properties on Series level determine the speed and mode. There are 2 events that can be used to trace progress: OnAnimateSerieStarted and OnAnimateSerieFinished. Here you can download a demo that adds animation and triggers it from a button click. Clicking a second time reverts the bars back to zero. |
As always, we thank all users for the numerous inputs, feedback, comments and suggestions. This is an invaluable help to steer our developments here at TMS software. We continue to look forward to all your further communications to direct our team to provide you better tools and components for your needs.
Kind regards,
TMS software team
Email:
info@tmssoftware.com
Web: http://www.tmssoftware.com
Support, FAQ & Manuals: http://www.tmssoftware.com/site/support.asp