delphi-xe3

Custom grid in firemonkey

孤街醉人 提交于 2021-02-11 07:10:40
问题 We are merging current vcl applications to Firemonkey. The current biggest issue is to create a tgrid with some custom columns. I need a column with a combobox cells as well as a column with multiple check boxes in each cell. 回答1: Take a look at my post http://monkeystyler.com/blog/entry/firemonkey-grid-basics-custom-cells-and-columns which explains the basics of FireMonkey grids and how to create custom columns. And here's another post which uses generics to create a column for any component

Custom grid in firemonkey

戏子无情 提交于 2021-02-11 07:07:11
问题 We are merging current vcl applications to Firemonkey. The current biggest issue is to create a tgrid with some custom columns. I need a column with a combobox cells as well as a column with multiple check boxes in each cell. 回答1: Take a look at my post http://monkeystyler.com/blog/entry/firemonkey-grid-basics-custom-cells-and-columns which explains the basics of FireMonkey grids and how to create custom columns. And here's another post which uses generics to create a column for any component

How to get the list of fonts available - Delphi XE3 + Firemonkey 2?

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-07 06:53:45
问题 In order to create a font picker I need to get the list of fonts available to Firemonkey. As Screen.Fonts doesn't exist in FireMonkey I thought I'd need to use FMX.Platform ? eg: if TPlatformServices.Current.SupportsPlatformService(IFMXSystemFontService, IInterface(FontSvc)) then begin edit1.Text:= FontSvc.GetDefaultFontFamilyName; end else edit1.Text:= DefaultFontFamily; However, the only function available is to return the default Font name. At the moment I'm not bothered about cross

Delphi XE2 TZipFile: replace a file in zip archive

China☆狼群 提交于 2021-02-07 02:32:17
问题 I'd like to replace a file (= delete old and add new) in a zip archive with the Delphi XE2/XE3 standard System.Zip unit. But there are no replace/delete methods. Does anybody have an idea how it could be achieved without needing to extract all files and add them to a new archive? I have this code, but it adds the "document.txt" once more if it's already present: var ZipFile: TZipFile; SS: TStringStream; const ZipDocument = 'E:\document.zip'; begin ZipFile := TZipFile.Create; //Zipfile:

Delphi XE2 TZipFile: replace a file in zip archive

半腔热情 提交于 2021-02-07 02:11:02
问题 I'd like to replace a file (= delete old and add new) in a zip archive with the Delphi XE2/XE3 standard System.Zip unit. But there are no replace/delete methods. Does anybody have an idea how it could be achieved without needing to extract all files and add them to a new archive? I have this code, but it adds the "document.txt" once more if it's already present: var ZipFile: TZipFile; SS: TStringStream; const ZipDocument = 'E:\document.zip'; begin ZipFile := TZipFile.Create; //Zipfile:

Delphi XE2 TZipFile: replace a file in zip archive

点点圈 提交于 2021-02-07 02:06:25
问题 I'd like to replace a file (= delete old and add new) in a zip archive with the Delphi XE2/XE3 standard System.Zip unit. But there are no replace/delete methods. Does anybody have an idea how it could be achieved without needing to extract all files and add them to a new archive? I have this code, but it adds the "document.txt" once more if it's already present: var ZipFile: TZipFile; SS: TStringStream; const ZipDocument = 'E:\document.zip'; begin ZipFile := TZipFile.Create; //Zipfile:

Delphi XE2 TZipFile: replace a file in zip archive

纵饮孤独 提交于 2021-02-07 02:06:23
问题 I'd like to replace a file (= delete old and add new) in a zip archive with the Delphi XE2/XE3 standard System.Zip unit. But there are no replace/delete methods. Does anybody have an idea how it could be achieved without needing to extract all files and add them to a new archive? I have this code, but it adds the "document.txt" once more if it's already present: var ZipFile: TZipFile; SS: TStringStream; const ZipDocument = 'E:\document.zip'; begin ZipFile := TZipFile.Create; //Zipfile:

Store Array of Record in JSON

喜你入骨 提交于 2021-02-04 20:57:48
问题 How can an array of record be stored in JSON via SuperObject library. For example.. type TData = record str: string; int: Integer; bool: Boolean; flt: Double; end; var DataArray: Array[0..100] of TData; 回答1: Just use the superobject Marshalling TSuperRTTIContext program Project1; {$APPTYPE CONSOLE} {$R *.res} uses superobject, System.SysUtils; type TData = record str : string; int : Integer; bool : Boolean; flt : Double; end; TDataArray = Array [0 .. 100] of TData; procedure Test; var

Proven/recommended way to migrate application from FIB+ to Fire-DAC components

元气小坏坏 提交于 2020-01-15 12:32:47
问题 I'm migrating a large family of applications having hardwired FIB+ connectivity inside to Fire-Dac components and I'm looking for some least painfull way, how to do it. First, I've decoupled and migrated the backend to get connectivity neutral and connectivity dependend parts and refactored existing applications manually. I've written FireDac parts as well. To migrate Delphi code it seems to be no problem... But big pain in the ass seems to be a migration of components placed on forms and

How to implement a close button on every tab of TTabControl in Delphi XE3 FireMonkey 2?

醉酒当歌 提交于 2020-01-15 11:39:11
问题 I am trying to create a browser-style TabControl with a small close button on every tab in FireMonkey FM2. Since there are no TTabsheet and TPageControl components in FM2, I could not use the answer from "How to implement a close button for a TTabsheet of a TPageControl". This code gives too many undeclared functions and variables that are not longer supported in FM2, I guess. I don't want to use any third-part components because you never know if they are going to support the next version of