firemonkey

How to create “No Activate” form in Firemonkey

纵然是瞬间 提交于 2019-12-03 03:13:42
问题 In XCode by adding these methods to your NSView subclass can prevent the window from becoming active when clicking on it: - (BOOL)shouldDelayWindowOrderingForEvent:(NSEvent )theEvent { return YES; } - (BOOL)acceptsFirstMouse:(NSEvent )theEvent { return YES; } - (void)mouseDown:(NSEvent )theEvent { [[[NSApp]] preventWindowOrdering]; } In Windows platform It is done by this simple code: HWND hWnd = FindWindowW((String("FM") + fmxForm->ClassName()).c_str(), fmxForm->Caption.c_str());

Is there any Delphi XE2 styles gallery?

依然范特西╮ 提交于 2019-12-02 21:58:12
In XE2 there is a new function : 'styles', for VCL( .vsf) and Firemonkey ( .styles), and some are provided in C:\Program Files\Embarcadero\RAD Studio\9.0\Redist\styles directory. As it seems to be easy to create a new style, is there any 'styles Gallery' Web site or blog somewhere ? RRUZ No, for the moment there is no such thing like a gallery of styles for FireMonkey or VCL styles. But if you want to create you own try these entries in my blog which show an easy way to create/modify new VCL styles and FireMoney styles in few clicks. Both articles include additional styles to download.

How to open an URL with the default browser with FireMonkey cross-platform applications?

大憨熊 提交于 2019-12-02 20:18:49
Usually, I use: ShellExecute(0, 'OPEN', PChar(edtURL.Text), '', '', SW_SHOWNORMAL); How can I have the same behaviour (opening a link in the default browser), on all platforms (Windows and OSX)? In the FireMonkey discussion forum I found this code for a question about NSWorkspace.URLForApplicationToOpenURL: uses Posix.Stdlib; .... _system(PAnsiChar('open ' + ACommand)); (not tested by me) Update : Posix is not available on Windows so it is not possible to write a solution which uses the same OS calls on all platforms. I suggest to move such code in a central 'XPlatform' unit which has some

Firemonkey version of VirtualTreeView

烈酒焚心 提交于 2019-12-02 19:09:15
Does anyone happen to know if there is a Firemonkey version of the popular VirtualTreeView in preparation? Also, has anybody collected some experiences with porting custom controls to Firemonkey and can estimate how much work it would be to port the virtual tree view to Firemonkey? We need this control and switching to Firemonkey is only an option if we can get this control to work. Thanks! As far as I understand the FireMonkey is so different from the VCL that it would require major rewrite, basically rewriting the control from scratch... had a quick look into google code's SVN, doesn't look

Why is drawing a line less than 1.5 pixels thick twice as slow as drawing a line 10 pixels thick?

烈酒焚心 提交于 2019-12-02 18:52:20
I'm just playing around with FireMonkey to see if graphical painting is any faster than GDI or Graphics32 (my library of choice at the moment). To see how fast it is, I've performed some tests, but I run into some odd behaviour: Drawing thin lines (<1.5 pixel wide) seems to be extremely slow compared thicker lines: Vertical axis: cpu ticks to paint 1000 lines Horizontal axis: line tickness* The results are quite stable; drawing always becomes much faster once line thickness is more than 1 pixel wide. In other libraries there seem to be fast algorithms for single lines, and thick lines are

Correctly using TAniIndicator in firemonkey mobile dev for wait for processing

↘锁芯ラ 提交于 2019-12-02 17:47:57
I am using Delphi XE-5 (Firemonkey Mobile Application) I am trying to get the TAniIndicator to work, by displaying during my long processing. I have a TAniIndicator (AniIndi) on my main form, but it does not spin. It displays correctly, but does not spin. begin Loading:= True; AniIndi.Visible:= True; AniIndi.Enabled:= True; UpdateAll; Application.ProcessMessages; //do my processsing here Loading:= False; AniIndi.Enabled:= False; AniIndi.Visible:= False; UpdateAll; Application.ProcessMessages; end; //EDIT BASED ON REMY's ANSWER TLoadThread = class(TThread) public Config: Boolean; constructor

Changing TTextCell background colour at runtime XE4

不羁岁月 提交于 2019-12-02 12:26:34
I worked through the example posted here as my starting point: Change background of TTextCell in a Firemonkey TGrid I have created a textcellstyle which references an image, and this is working well. When I run the program all the cells display the background image as expected. From the above link, Mike Sutton (I hope you're reading this, what would we do without your input!) writes (repeated here just to make it easier): "You can then set each of your cells StyleLookup properties to use it, or set the styles StyleName to TextCellStyle to have it picked up automatically for every TTextCell."

Move borderless form in Firemonkey

╄→尐↘猪︶ㄣ 提交于 2019-12-02 11:02:18
In VCL forms I use WM_SYSCOMMAND , but in firemonkey it is undeclared. I test this code: procedure TForm4.dragPanelMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Single); begin isDraging := true; X0 := X; Y0 := Y; end; procedure TForm4.dragPanelMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Single); begin if isDraging then begin Form4.Left := Trunc(Form4.Left + X - X0); Form4.Top := Trunc(Form4.Top + Y - Y0); end; end; procedure TForm4.dragPanelMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Single); begin isDraging := False; end; this

Clear TEdit control rad studio delphi

烈酒焚心 提交于 2019-12-02 10:40:08
问题 When use TEdit control on the right side stay small icon 'x'. How after click on icon clear TEdit box. Tnx all! 回答1: Delphi provide TClearEditButton to clear the TEdit content. It can be added by right clicking and selecting AddItem - TClearEditButton from the popup menu. It also has a Click procedure overriden in FMX.Edit unit like: procedure TClearEditButton.Click; var EditTmp: TCustomEdit; begin inherited Click; EditTmp := GetEdit; if EditTmp <> nil then begin if EditTmp.Observers

What has happened to ComboBox.Sorted := True; in Delphi 10.2?

丶灬走出姿态 提交于 2019-12-02 10:14:30
Having recently received a 'Tumbleweed' badge for my last question, I am not sure whether I should be asking any more questions, but here goes. I am populating a TComboBox with items from a sqlite table and this works fine. In my previous version of Delphi I was able to use ComboBox1.Sorted := True; to sort the items, but this seems to have disappeared in Delphi 10.2. I can sort the items in the table by applying a query and then populate the TComboBox from the sorted table. However, for curiosities sake I would like to find out how one now sorts items in a TComboBox . I have found some