NSNativeButton as Default |
Post Reply ![]() |
Author | |
Andrew Norman ![]() New Member ![]() Joined: 08 Apr 2016 Posts: 3 |
![]() ![]() ![]() ![]() Posted: 08 Apr 2016 at 12:46am |
Hi,
Is it possible to set a Native Button as default, i.e. it is coloured Blue 'before' clicking? Many thanks Andy
|
|
![]() |
|
Pieter Scheldeman ![]() TMS Support ![]() Joined: 18 May 2010 Posts: 3396 |
![]() ![]() ![]() ![]() |
Hi,
You can try the following code to accomplish this: uses FMX.Platform.Mac, Macapi.AppKit; procedure TForm1.FormCreate(Sender: TObject); begin TMSFMXNativeNSButton1.BezelStyle := bbsRoundedBezelStyle; end; procedure TForm1.FormShow(Sender: TObject); var h: TMacWindowHandle; begin h := WindowHandleToPlatform(Self.Handle); h.Wnd.setDefaultButtonCell(TNSButtonCell.Wrap(TMSFMXNativeNSButton1.Button.cell)); end; |
|
![]() |
|
Andrew Norman ![]() New Member ![]() Joined: 08 Apr 2016 Posts: 3 |
![]() ![]() ![]() ![]() |
Works perfect, many thanks for your prompt response.
Andy
|
|
![]() |
Post Reply ![]() |
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |