delphi-xe8

TRESTRequest: Is it possible to use custom media types in a POST request?

蹲街弑〆低调 提交于 2021-02-10 12:25:35
问题 We have an API that expects our own vendor specific content type for example application/vnd.xxxx.custom.custom-data+json but looking through the source code of REST.Client it seems to always default to one of the ContentTypes in REST.Types for example when assigning ctNone in my body request it will default to ctAPPLICATION_X_WWW_FORM_URLENCODED . I've tried assigning the content type directly to the TRESTClient.ContentType property but that gets overwritten by the TRESTRequest.ContentType

TRESTRequest: Is it possible to use custom media types in a POST request?

▼魔方 西西 提交于 2021-02-10 12:25:06
问题 We have an API that expects our own vendor specific content type for example application/vnd.xxxx.custom.custom-data+json but looking through the source code of REST.Client it seems to always default to one of the ContentTypes in REST.Types for example when assigning ctNone in my body request it will default to ctAPPLICATION_X_WWW_FORM_URLENCODED . I've tried assigning the content type directly to the TRESTClient.ContentType property but that gets overwritten by the TRESTRequest.ContentType

FireDAC equivalent of DBExpress briefcase model

淺唱寂寞╮ 提交于 2021-01-29 04:30:27
问题 I have been using DBExpress connections to various databases (mostly MSSQL, Sybase SQL) with: SQLConnection -> SQLDataSet -> DataSetProvider -> ClientDataSet. I need to connect to the databases in a fashion that does NOT write changes back to the tables. So, the DataSetProvider has ResolveToDataSet:=false, and the ClientDataSet has LogChanges:=false (for performance). In use I connect the SQLConnection, open the ClientDataSet, and then close the SQLConnection. I can then manipulate the

Delphi - How to correctly register a graphic class since XE8?

て烟熏妆下的殇ゞ 提交于 2021-01-26 23:37:47
问题 I'm writing a Delphi package, which provides a new custom TGraphic object, allowing to read a new image format in VCL components like TImage. I originally developed this package with RAD Studio XE7, and it worked well. However I migrated recently to a newer RAD Studio compiler version, and although my package continues to work properly on that new version, I noticed a strange bug that never appeared before. I have a form with several components, some of them are TImage components. Immediately

Delphi - How to correctly register a graphic class since XE8?

一个人想着一个人 提交于 2021-01-26 23:37:45
问题 I'm writing a Delphi package, which provides a new custom TGraphic object, allowing to read a new image format in VCL components like TImage. I originally developed this package with RAD Studio XE7, and it worked well. However I migrated recently to a newer RAD Studio compiler version, and although my package continues to work properly on that new version, I noticed a strange bug that never appeared before. I have a form with several components, some of them are TImage components. Immediately

How to fill cell of a string grid using custom color?

让人想犯罪 __ 提交于 2020-05-23 10:56:13
问题 I am trying to write custom date picker(calendar). The dates will be displayed on the stringgrid. I am trying to fill the clicked cell with a custom color and make that selected celltext bold. Here is my code: type TStringGrid = Class(Vcl.Grids.TStringGrid) private FHideFocusRect: Boolean; protected Procedure Paint;override; public Property HideFocusRect:Boolean Read FHideFocusRect Write FHideFocusRect; End; TfrmNepaliCalendar = class(TForm) ... ... ... end; procedure TfrmNepaliCalendar

Capturing signature very sketchy on touch screen

雨燕双飞 提交于 2020-01-15 07:17:23
问题 I followed a tutorial for capturing signatures in Firemonkey, and made some major modifications (essentially a re-write) to encapsulate it inside of a custom control. I've written plenty controls in VCL, but this is my first for FMX. When using this with a mouse (Windows or OS X), it works perfectly. However, when using a touch screen (iOS), it becomes extremely sketchy. Specifically, it keeps capturing a mouse up event (or in this context, "pen up"). So a straight line becomes actually a

Non-english text size too small in windows 7

て烟熏妆下的殇ゞ 提交于 2020-01-06 04:01:09
问题 I am trying to display the current date in Nepali language. I have declared constant string for the caption. It renders the text pretty fine on windows 8.1 but the same text is displayed too small in windows 7. Adjusting the font size also doesn't help much as it should. Things I tried Installed Nepali language pack for windows 7 Installed several Unicode fonts like arial unicode ms, segoe ui, microsoft neo gothic and others The source code has been saved as UTF-8 encoding But the problem

Go Top a TVertScrollBox

房东的猫 提交于 2020-01-06 02:35:35
问题 If a user has scrolled down in a VertScrollBox, how do I set it back to the top position again in XE8? this code don't Work on XE8 VertScrollBox1.ViewportPosition := PointF(0,0); VertScrollBox1.RealignContent 回答1: VertScrollBox1.ViewportPosition := PointF(VertScrollBox1.ViewportPosition.X, 0); Works for me on Android and Windows. 来源: https://stackoverflow.com/questions/32684741/go-top-a-tvertscrollbox

Go Top a TVertScrollBox

≡放荡痞女 提交于 2020-01-06 02:35:27
问题 If a user has scrolled down in a VertScrollBox, how do I set it back to the top position again in XE8? this code don't Work on XE8 VertScrollBox1.ViewportPosition := PointF(0,0); VertScrollBox1.RealignContent 回答1: VertScrollBox1.ViewportPosition := PointF(VertScrollBox1.ViewportPosition.X, 0); Works for me on Android and Windows. 来源: https://stackoverflow.com/questions/32684741/go-top-a-tvertscrollbox