firemonkey

translate pascal to c++

只谈情不闲聊 提交于 2019-12-08 06:35:31
问题 The following code runs in the ItemClickEx event of a firemonkey ListView. I want to know how to do this in C++. procedure TfrmCategory.lstListCategoryItemClickEx(const Sender: TObject; ItemIndex: Integer; const LocalClickPos: TPointF; const ItemObject: TListItemObject); begin if ItemObject is TListItemAccessory then begin ShowMessage('Acessory clicked'); end; end; Source: link here. I don't know how to do the "if ItemObject is TListItemAccessory" in c++. 回答1: The C++ equivalent to Delphi's

Firemonkey ListView item indexes not updating

感情迁移 提交于 2019-12-08 04:55:16
问题 I'm using a TListView in Firemonkey. On startup, I create 3 list view headers and keep references to them for future use (specifically inserting items below each header). FItemHeader:= LV.Items.Add; FItemHeader.Purpose:= TListItemPurpose.Header; FItemHeader.Text:= 'Items'; FChargeHeader:= LV.Items.Add; FChargeHeader.Purpose:= TListItemPurpose.Header; FChargeHeader.Text:= 'Charges'; FPaymentHeader:= LV.Items.Add; FPaymentHeader.Purpose:= TListItemPurpose.Header; FPaymentHeader.Text:= 'Payments

Can i call a web service from FireMonkey for iOS?

喜夏-厌秋 提交于 2019-12-07 17:51:11
问题 I'm new to iOS, have been developing in Delphi for many years. I don't know FPC well and i find it very hard to figure out which classes are available on iOS. is there any FireMonkey classes for calling web services and parsing xml? 回答1: Yes you can call a webservice :) No it is not simple :( You need to access the iOS framework directly... The following code fragments will help... First a pascal example of how to send/receive data via TCP https://forums.embarcadero.com/thread.jspa?messageID

Delphi TListBox iOS making new itemstyle/behavior

隐身守侯 提交于 2019-12-07 17:00:53
问题 I need to show custom data. For example I need to show a contact list with name, description, photo. And ideally I would also like to show custom data there, e.g. a button to launch telephone call. The default styles do not quite do what I want, but fairly close. Thus, as far as I can tell, TListBox could be a decent control for this if I could create custom styles? Is that possible? (Anotther problem of course is setting the values of the custom data controls.) 回答1: You should take a good

Unicode in Delphi form TRectangle TText

假如想象 提交于 2019-12-07 08:45:53
问题 I'm new to Delphi & in DelphiXE4 editor I am trying to make chessboard gui on form, using x64 TRectangle for board (alternate colors). I want to add unicode chess pieces but in ObjectInspector properties when I add unicode it displays literally on the form. How can I add Unicode to TText (so the form displays unicode as chess pieces)? (After I want to add dragndrop to TRectangles/unicode chess-any ideas?). Rectangle63: TRectangle; Rectangle64: TRectangle; Text1: TText; Text2: TText; Here is

Creating specific Custom TListBoxItem with given example and trouble with fontColor property

人走茶凉 提交于 2019-12-07 07:10:25
问题 Can someone please guide me in the right direction. I am attempting to create a Custom ListboxItem using Delphi XE4 for a iOS application. My goal output would be something along the lines of the photo above, where as I am currently stuck here (image below). I have been successful at dynamically generating a ListBoxItem and inserting an TLabel object, however, I am unable to change the 'fontColor' property of the TLabel to a desired color. I can code TLabel.Fontcolor := ClaBlue; But the color

Delphi XE4 FireMonkey TMemo Transparent? (iOS)

馋奶兔 提交于 2019-12-07 03:20:57
问题 Is there any way to make the TMemo transparent in Delphi/iOS/FireMonkey? I don't see any way to edit styles myself when selecting + right-clicking the memo control... 回答1: Try removing memo's background on applying style event. procedure TForm1.Memo1ApplyStyleLookup(Sender: TObject); var BckObject: TFmxObject; begin BckObject := Memo1.FindStyleResource('background'); if Assigned(BckObject) and (BckObject is TSubImage) then begin TSubImage(BckObject).Source := nil; end; end; 回答2: You need to

How to show more than 200 rows in TStringGrid using LiveBindings?

随声附和 提交于 2019-12-07 02:50:44
问题 I have a TDataSource that is backed by a TClientDataset bound to a TStringGrid . I did this by right-clicking on the grid, selecting " Link to DB Datasource... ", and selecting the DataSource. This setup the LiveBindings for me. When I run the application, the grid only fills with 200 rows, even though there are 5000 records in the dataset. I'm unable to find any documentation regarding how to change the number of rows displayed or the proper way to allow the user to scroll through all of the

Delphi XE2: Why FireMonkey apps are HD?

感情迁移 提交于 2019-12-07 02:47:08
问题 According to release notes of Delphi XE2. FireMonkey may create HD application. HD stands for High Definition. Why HD? Can't VCL application create HD apps as FireMonkey? 回答1: Here is the documentation on Firemonkey, from it you can see several features. Compare normal TV to HD TV. Is like comparing the VCL to what Firemonkey can do. It's a Marketing term that I suspect will catch on as it, does highlight the power. HD Applications refer many of the features of Firemonkey but the following

Correct way to create styles for custom components

折月煮酒 提交于 2019-12-07 01:23:00
问题 I sort of asked this question at the end of another post but feel this topic needs a question of its own... If I have created my own component with its own .style what is the correct procedure to merge that with the defined styles supplied with Delphi without modifying the defaults? Can I embed a default style into a component I have created and can that embedded style inherit most of the style of its parent control? I feel that I am missing a link that I am struggling to describe. My