firemonkey

TOpenDialog/NSOpenPanel not working in a sandboxed Delphi app

最后都变了- 提交于 2019-12-10 03:56:18
问题 There seems to be a problem with the TOpenDialog in a Firemonkey application, which is sandboxed for the Mac Appstore. I use XE3, but it is also present in XE2. I actually found a QC report here, but it is still unresolved: http://qc.embarcadero.com/wc/qcmain.aspx?d=105344 Has anyone had the same problem, or any ideas how to work around it? It is very easy to check. Just put a TOpenDialog on a form and call the Execute method. Sign and sandbox the application according to the Embarcadero

How to add menu items separators which work as expected on OSX?

穿精又带淫゛_ 提交于 2019-12-10 03:26:47
问题 On Windows platform, with the VCL , when we want to add a separator in a menu, we add a TMenuItem with a Caption := '-' ; With FireMonkey , we add a TMenuItem with a Text := '-' ; It works as expected on Windows platform, the item with the Text='-' is displayed as a separator. But, when I run the same application on OSX , I have the minus sign visible... I haven't found any property on the TMenuItem to specify it is a separator ... I have tried with a TMainMenu and a TMenuBar ( UseOSMenu :=

How to process an asynchronous queue from within the main UI thread?

杀马特。学长 韩版系。学妹 提交于 2019-12-10 00:20:08
问题 I am designing two components that asynchronously receive objects of a custom class (TMELogMessage) and store them in a thread-safe internal container. The first component is non visual (TMEFileLogger) and should write some info from these objects to a log file (non surprisingly). The second component (TMELogGrid) is a visual FMX.Grid descendant that should visualize some info from these objects in the UI. But what they do with these objects is, I think, irrelevant. The problem I am facing is

How to track the user location at full time with a delphi app under android/ios

半腔热情 提交于 2019-12-09 23:57:48
问题 I need to track all the time the user location, even when the user is not using my app. However my knowledge of android/ios architecture is little low to know how to do this. Do I need to make my full app alive in memory at all time (and I think this will be a little waste of resources) or do I need to create a small app like service (don't even know if it's possible) to do this job? 回答1: Try to use android service with START_STICKY attribute. In background thread you can listen for location

Delphi delete FireMonkey element from Form on Android

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 21:53:28
问题 I created an element on my Form with this code in the OnShow event: procedure TForm4.FormShow(Sender: TObject); var VertScrollLink:TVertScrollBox; begin VertScrollLink := TVertScrollBox.Create(form4); VertScrollLink.Align := TAlignLayout.Client; VertScrollLink.Parent := form4; end; On some action, I need to delete the layout dynamically: for LIndex := form4.ComponentCount-1 downto 0 do begin if (form4.Components[LIndex].ToString='TVertScrollBox') then begin //showmessage(form4.Components

Fastest way to draw pixels in FireMonkey

狂风中的少年 提交于 2019-12-09 17:25:48
问题 I have made the following code: procedure TForm15.Button1Click(Sender: TObject); var Bitmap1: TBitmap; im: TImageControl; Color: TColor; Scanline: PAlphaColorArray; x,y,i: Integer; begin for i:= 1 to 100 do begin im:= ImageControl1; Bitmap1:= TBitmap.Create(100,100); try for y:= 0 to 99 do begin ScanLine:= Bitmap1.ScanLine[y]; for x:= 0 to 99 do begin ScanLine[x]:= Random(MaxInt); end; end; ImageControl1.Canvas.BeginScene; ImageControl1.Canvas.DrawBitmap(Bitmap1, RectF(0,0,Bitmap1.Width,

How to adjust button size to fit the text in Delphi FireMonkey?

大城市里の小女人 提交于 2019-12-09 16:32:17
问题 I want button size (width and height) to be as small as possible, but I want it to fit the text. Any code example? Delphi XE4 FireMonkey Mobile Application. 回答1: FireMonkey renders text via methods using TTextLayout class. We can access this methods via a class helper and then change the buttons size based on the information provided by the layout. uses FMX.TextLayout; type TextHelper = class helper for TText function getLayout : TTextLayout; end; function TextHelper.getLayout; begin result :

Delphi XE2 Firemonkey sample app not running on a MAC

廉价感情. 提交于 2019-12-09 14:16:25
问题 I am trying to run a sample Firemonkey app on a Mac, but I am getting this message in the mac: dyld: Library not loaded: @rpath/libcgunwind.1.0.dylib Referenced from: /Users/nobre/Applications/Embarcadero/PAServer/scratch-dir/rafael_colucci-Nobre/Project37.app/Contents/MacOS/Project37 Reason: image not found dyld: Library not loaded: @rpath/libcgunwind.1.0.dylib Referenced from: /Users/nobre/Applications/Embarcadero/PAServer/scratch-dir/rafael_colucci-Nobre/Project37.app/Contents/MacOS

Custom drawing of TCustomListbox items

若如初见. 提交于 2019-12-08 19:51:38
问题 I'm rewriting a VCL component showing a customized TCustomListbox to Firemonkey in Delphi 10.2. The customization used an overridden DrawItem , basically adding some indentation and setting the text color depending on the item text and index. DrawItem made it rather easy, but there seem to be nothing like that in FMX. I can override PaintChildren and draw every item myself, but then it looks differently and I have to deal with scrolling and everything myself. I'm just starting with FMX and

Cant delete controls in Delphi xe7

落花浮王杯 提交于 2019-12-08 15:27:18
问题 Just installed Delphi xe7. Opened a project developed with XE7. Side note, but my first concern is that everything causes the IDE to hang, whether it be changing 'views' from Master to iPhone4, or simply dragging controls around in Design View. I previously had a tools unit that had a function that accepted a TComboEdit param. It seems they moved things around again because the function is now broken. To quickly find out which unit hosts combo edits, I opened a form and dropped a Combo edit