Quantcast
Channel: Blogs from Sarina D - Embarcadero Community
Viewing all 112 articles
Browse latest View live

Over 50 IoT Components available in 10.1 Berlin

$
0
0

Available via GetIt in 10.1 Berlin are over 50 IoT device components.

These components cover popular IoT devices ranging from healthcare to fitness and home automation. Included are both BluetoothLE (BLE) and Z-Wave device components.

 

We have a separate IoT docwiki to help you get started building applications that connect to the Internet of Things.

You can find the included sample projects for Delphi and C++ in the following directories after installing each IoT component:

  • Start | Programs | Embarcadero RAD Studio Berlin | Samples and then navigate to:
    • Delphi: Internet of Things\Object Pascal\Thing Connect\
    • C++: Internet of Things\CPP\Thing Connect\

Click here to watch a video tutorial on getting started building IoT applications.
 
 

[DownloadButton Product='Delphi' Caption='Download the trial and start building IoT applications today!']


Read more

Taskbar Notification Badge support in Windows 10 Anniversary Update

$
0
0

With RAD Studio Berlin, you can build applications for Windows 10 with support for local notifications. Today, I thought I would show you an example of our Notifications demo that is included with RAD Studio Berlin running on Windows 10 Anniversary Update.

This includes notification badge icon support to indicate that a new notification has been received. This is a new feature in the Anniversary Update that you can leverage in your VCL and FireMonkey applications today. 

As you can see in the screenshot below, a notification badge (1) showing the number of current notifications is shown.

Windows 10 Windows 10 Anniversary Update
 

   

Windows 10 Notification Samples:

Object Pascal:

CPP:

 

Windows 10 Anniversary Update Webinar with Marco Cantu - Sign Up Today

For more information on RAD Studio Berlin's unmatched support for Windows 10 Anniversary Update, check out Marco's blog post.

[DownloadButton Product='Delphi' Caption='Download a Delphi trial today!']

 

 


Read more

Build apps for macOS Sierra and iOS 10 with RAD Studio Berlin Update 1

$
0
0

Last week, Apple released iOS 10. Today, Apple released macOS Sierra, the latest version of its Mac operating system.

Berlin Subscription Update 1 introduces support for targeting iOS 10 and macOS Sierra in both your Delphi and C++Builder applications.

In the screenshots below, you can see our Object Pascal TWebBrowser sample application running on both MacOS Sierra and iOS 10.


Read more

See What's New in Berlin Update 1 Video

$
0
0

See the key new RAD Studio Berlin Update 1 features in action:


10% off RAD Studio, Delphi, C++ Builder

Get on the latest edition of RAD Studio, Delphi, and C++ and get 10% OFF when you buy Professional or above (valid until 30th September) with promo code BERLIN10.


Read more

New IoT Device Components in RAD Studio Berlin Update 1

$
0
0

RAD Studio Berlin offers more than 50 Internet of Things device components. This includes support for popular Bluetooth LE and Z-Wave IoT devices ranging from healthcare to fitness and home automation. A couple of new IoT device components have been added in Subscription Update 1 and are available for download via the GetIt Package Manager (Tools > GetIt Package Manager).


Read more

Filtering support for custom ListView layouts in Update 1

$
0
0

In RAD Studio Berlin, we added a new ListView Item Designer for FireMonkey applications that allows you to easily design custom ListView layouts.


Read more

Getting Started Building Multi-Device Applications

$
0
0

With RAD Studio Berlin, we provide a guided tour to help you get started building your first multi-device application.

The guided tour is accessible from the Welcome Page.

 

For more info on the Guided Tours, click here.

[DownloadButton Product='Delphi' Caption='Download the Delphi 10.1 Berlin Trial today!']


Read more

Setting a Tab Item Badge Value

$
0
0

I recently received some questions on how to display a circular badge icon and badge value on a tab item in TTabControl.

Badge icons are commonly set to indicate a status change. The number displayed on the badge is frequently tied to a local notification or a push notification that's been received.

For example, popular social media apps show a badge value on the Notifications tab to show the number of new comments that you've received on a post while email clients display a badge value on the Inbox tab to indicate the number of unread emails.

In today's post, I thought I would show you how to set the badge icon and value on a selected tab item. This works with both the default native styles as well as custom styles, including the styles that are part of the premium style pack.

This demo uses a client aligned TTabControl with 3 tab items. After enabling the switch, a badge icon is shown on the "badge item" tab, and you can increment the value.

 

Note: Since this is just a quick demo to illustrate how to increment the badge value, we are using TSpinBox, but it's recommended to use a TSpeedButton with the correct "stepper" styling when adding app navigation that allows the user to increase/decrease values. This is especially true for iOS to ensure you are adhering to Apple's UI guidelines.

Example:

 

You can also customize the fill color of the circle along with the font color:

 

Platform styling:

 

 

 

Custom UI Styling using one of the premium iOS styles:

 

Download the project here.

unit TabBadgeFrm;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.TabControl, FMX.Controls.Presentation, FMX.Edit,
  FMX.EditBox, FMX.SpinBox, FMX.StdCtrls, FMX.Layouts, FMX.ListBox,
  FMX.NumberBox;

type
  TForm16 = class(TForm)
    TabItem1: TTabItem;
    TabItem2: TTabItem;
    BadgeItem: TTabItem;
    SpinBox1: TSpinBox;
    ToolBar1: TToolBar;
    Switch1: TSwitch;
    ListBox1: TListBox;
    ListBoxItem1: TListBoxItem;
    ToolLabel: TLabel;
    TabControl1: TTabControl;
    procedure BadgeItemPaint(Sender: TObject; Canvas: TCanvas; const ARect: TRectF);
    procedure SpinBox1Change(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Switch1Switch(Sender: TObject);
    procedure StepperUpClick(Sender: TObject);
  private
    FBadge: Integer;
    FShowBadge: Boolean;
    procedure SetBadge(const Value: Integer);
    procedure SetShowBadge(const Value: Boolean);
    { Private declarations }
  public
    { Public declarations }
    property Badge: Integer read FBadge write SetBadge;
    property ShowBadge: Boolean read FShowBadge write SetShowBadge;
  end;

var
  Form16: TForm16;

implementation

{$R *.fmx}
{$R *.iPhone55in.fmx IOS}

procedure DrawBadge(Canvas: TCanvas; const ARect: TRectF; const Text: string;
  const Color: TAlphaColor = TAlphaColorRec.Red);
const
  Padding = 2;
  HorzTextMargin = 6;
  VertTextMargin = 4;
var
  R: TRectF;
  TextSize: TSizeF;
  Brush: TBrush;
  BadgeRadius: Single;
begin
  Canvas.Font.Size := 12;
  // Measure text width
  TextSize := TSizeF.Create(Canvas.TextWidth(Text), Canvas.TextHeight(Text));
  // Calculate badge rect
  R := TRectF.Create(0, 0, HorzTextMargin * 2 + TextSize.Width, VertTextMargin * 2 + TextSize.Height);
  if R.Width < R.Height then
    R.Width := R.Height;
  // Position rect
  R := TRectF.Create(ARect.Right - R.Width, ARect.Top, ARect.Right, ARect.Top + R.Height);
  R.Offset(-Padding, Padding);
  // Draw badge
  BadgeRadius := R.Height / 2;
  Brush := TBrush.Create(TBrushKind.Solid, Color);
  try
    Canvas.FillRect(R, BadgeRadius, BadgeRadius, AllCorners, 1, Brush);
  finally
    Brush.Free;
  end;
  // Draw text
  Canvas.Fill.Color := TAlphaColorRec.White;
  Canvas.FillText(R, Text, False, 1, [], TTextAlign.Center, TTextAlign.Center);
end;

procedure TForm16.BadgeItemPaint(Sender: TObject; Canvas: TCanvas; const ARect: TRectF);
begin
  if ShowBadge then
    DrawBadge(Canvas, ARect, FBadge.ToString);
end;

procedure TForm16.FormCreate(Sender: TObject);
begin
  FBadge := 1;
end;

procedure TForm16.SetBadge(const Value: Integer);
begin
  if FBadge  Value then
  begin
    FBadge := Value;
    BadgeItem.Repaint;
  end;
end;

procedure TForm16.SetShowBadge(const Value: Boolean);
begin
  if FShowBadge  Value then
  begin
    FShowBadge := Value;
    BadgeItem.Repaint;
  end;
end;

procedure TForm16.SpinBox1Change(Sender: TObject);
begin
  Badge := Trunc(SpinBox1.Value);
end;

procedure TForm16.StepperUpClick(Sender: TObject);
begin
  Badge := Trunc(SpinBox1.Value);
end;

procedure TForm16.Switch1Switch(Sender: TObject);
begin
  ShowBadge := Switch1.IsChecked;
end;

end.

 [DownloadButton Product='Delphi' Caption='Download a RAD Studio Trial Today!']

 

 


Read more

FireMonkey sessions at CodeRage next week

$
0
0

CodeRage XI is next week. It's going to be a great, multi-day event. CodeRage XI is the largest, free online conference of the year from Embarcadero Technologies. As part of this year's event, we have more great sessions planned on multi-device development. This includes my FireUI Deep Dive webinar.

As part of my session, I will show how to create a custom style for a control using Photoshop and the Bitmap Style Designer.

 

View the schedule here.  My session is on Thursday, November 17th at 2 pm Pacific time.

 

 

 

 

 

 


Read more

Creating Custom Styles with the Bitmap Style Designer - CodeRage Replay, Tips & Tricks and Sample Files

$
0
0

During this week's CodeRage event, I gave a lightning talk on using the Bitmap Style Designer to create a custom style for TSwitch. This blog post summarizes the steps, tips and tricks shown during my CodeRage session. It also includes the style graphics shown during the session and the session replay link.


Read more

Increase productivity with Quick Edits in Berlin Anniversary Edition

$
0
0

Introduced in RAD Studio Berlin Update 2 Anniversary Edition, Quick Edits is a great new IDE productivity feature for VCL developers.

Using the Form Designer, Quick Edits allow you to rapidly modify the name, caption, alignment, layout and color of a control, copy the component name, quickly layout a form from a template, connect images and image lists, and bind the control to a data source or data field.


Read more

New VCL Calendar Controls in Berlin Anniversary Edition

$
0
0

The new VCL calendar controls in RAD Studio Berlin Update 2 Anniversary Edition mimic WinRT UI controls while providing support for older versions of Windows.


[YoutubeButton url='https://www.youtube.com/watch?v=sxsRqTJcmKo']
 
 

Get More. Do More. Spend Less.

To celebrate the launch of 10.1 Berlin Update 2 - Anniversary Edition, take advantage of our time limited offer:

10% off Professional, 15% off Enterprise and 20% off Architect.

Offer ends November 30, 2016.

 
 

Read more

Changing the color scheme of an Android style

$
0
0

Following up on my recent blog post and CodeRage session on creating custom style elements, I thought I would do another post on custom styling, this time focusing on changing the overall color scheme for one of the style templates we provide without creating new style elements from scratch.


Read more

Accessing the battery level on your iOS device

$
0
0

I recently saw a question on our forums on how to access the current battery level on an iOS device using FireMonkey, so I thought I would do a quick post about it. This sample code extends the DeviceInfo code snippet included with RAD Studio 10.1 Berlin Anniversary Edition.


 

unit uMain;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls, FMX.ListBox,
  FMX.Layouts, FMX.Controls.Presentation;

type
  TDeviceInfoForm = class(TForm)
    btnGetDeviceInfo: TButton;
    ListBox1: TListBox;
    lbOSName: TListBoxItem;
    lbOSVersion: TListBoxItem;
    ToolBar1: TToolBar;
    Label1: TLabel;
    lbDeviceType: TListBoxItem;
    lblBatteryLevel: TListBoxItem;
    procedure btnGetDeviceInfoClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DeviceInfoForm: TDeviceInfoForm;

implementation
{$IFDEF IOS}
uses
  iOSapi.UIKit, iOSapi.Foundation, Macapi.Helpers;
{$ENDIF}

{$R *.fmx}

{$IFDEF IOS}
procedure TDeviceInfoForm.btnGetDeviceInfoClick(Sender: TObject);
var
  Device : UIDevice;
begin
  Device := TUIDevice.Wrap(TUIDevice.OCClass.currentDevice);
  lbOSName.Text := Format('OS Name: %s', [NSStrToStr(Device.systemName)]);
  lbOSVersion.Text := Format('OS Version: %s', [NSStrToStr(Device.systemVersion)]);
  lbDeviceType.Text := Format('Device Type: %s', [NSStrToStr(Device.model)]);

//code added for detecting battery level
  Device.setBatteryMonitoringEnabled(True);
  lblBatteryLevel.Text := Format ('Battery Level: %d', [Round(Device.batteryLevel*100)]);
end;
{$ENDIF}


end.

 

 

 

[BuyButton Product='RAD' Caption='Buy RAD Studio Berlin now']

 


Read more

Multi-Device UI Styling with our Premium Style Pack

$
0
0

FireMonkey provides support for both native styling and custom styling. Part of the current Bonus Pack are eleven premium FireMonkey styles. Choose from Jet, Sterling, Diamond, Emerald Crystal, Emerald Dark, Coral Crystal, Coral Dark, Vapor, Copper, Copper Dark and Radiant styles, optimized for iOS, Android, Windows and Mac application development.


Each style includes the required graphics to ensure the user interface looks great on each supported target platform. For example, this includes 1x, 1.5x, 2x and 3x resolution graphics on Android. We have many great resources to help you get started using custom styles in your multi-device applications.

Docwiki Tutorials:

 

If you are interested in creating your own custom styles, check out my latest blog posts for step-by-step tutorials:

 

Emerald Crystal Premium Style

Diamond Premium Style

 

 


Jet Premium Style

 

By adding a style selector to your multi-device application, you give your users the option to select the theme they like best. Click here for the tutorial.

A great collection of style related posts can be found here.

[BuyButton Product='Delphi' Caption='Get RAD Studio 10.1 Berlin Anniversary Edition today! ']

 

 

 


Read more

Custom buttons and the integrated Style Designer

$
0
0

With the integrated Style Designer in RAD Studio Berlin, you can quickly create custom image buttons. For creating entire multi-device styles from scratch, we recommend you use the Bitmap Style Designer, available via the Tools menu.

  1. Create a new FireMonkey multi-device application.
  2. Select a "Style" from the drop-down menu in the FireUI Designer. This will allow you to create a custom style for that platform. You can also change the platform in the Style Designer later.
  3. Drop a TButton onto your form.
  4. Right-click on the button and select "Edit Default Style".
  5. Drag and drop TImage from the Object Inspector onto the buttonstyle layout in the Structure pane.
  6. Select Image1Style in the Structure pane.
  7. In the ObjectInspector, select MultiResBitmap and load your image file (e.g. battery.png) and set Margins.
  8. Select "buttonstyle" in the Structure Pane, then change the name in the Object Inspector to make the style easily identifiable in the list of style elements (e.g. buttonstyle_battery).
  9. Apply the changes and close the Style Designer by clicking on the "x" in the top right hand corner.
  10. Ensure that the StyleBook property for your form is set to StyleBook1.
  11. Select the button control on your form, and set StyleLookUp to buttonstyle_battery.
  12. Repeat the steps to create a custom button style for each platform.

 

 

When right-clicking on a FireMonkey control, you see two different style related options:

Edit Default Style:

  • Opens a new FireMonkey Style Designer window in which you can modify the style for the component class. For example, if you right-clicked a button, you can modify the "buttonStyle" object (a default style for the TButton class).

Edit Custom Style:

  • Opens a new FireMonkey Style Designer window in which you can modify the selected control style. For example, if you right-clicked a button, you can modify the "button1Style" object (a style for this button only).

 

Special Offers

Get More. Do More. Spend Less

Six Great Offers for the Holiday Season. Get RAD Studio Berlin today!

 


Read more

Applying a custom style to your Windows and Mac application

$
0
0

I recently got a question on how to best apply a custom FireMonkey style to a Windows and Mac application. We have detailed documentation and videos on working with custom styles, but I thought I would provide a quick tutorial today that outlines the key steps.

Part of our Bonus Pack (available to Update Subscription customers) are over ten premium FireMonkey styles. These styles allow you to quickly overhaul the look of your application with a custom look and feel. Each style has built-in support for multiple resolutions.


Read more

Connecting the new Windows 10 Calendar Controls to data using the LiveBindings Designer

$
0
0

Pawel recently did a great post on making the Windows 10 calendar controls database aware. I thought I would follow that up with a post on connecting the new Windows 10 VCL calendar controls to data using the LiveBindings Designer. 

In this post, I am going to connect TCalendarView to sample data and enable color changing of the calendar's background color using TColorBox. None of this involves any code as everything is set up using the LiveBindings Designer.


Read more

Update your application UI with TMultiView

$
0
0

TMultiView is a smart menu component for FireMonkey applications that makes it really easy to create app navigation that automatically adjusts itself depending on form factor, orientation and target platform. TMultiView is a container component which means that you can parent many different components to it, such as a top aligned TToolbar or a client aligned TListview.


Read more

Changing TMultiView's Fill Color

$
0
0

Tip of the day: How to change TMultiView's fill color

1. Add TMultiView to your form

2. Right-click on the control and select 'Edit Default Style'.  This opens the integrated Style Designer

3. Select 'MultiViewStyle' in the Structure Pane

4. In the Object Inspector, select Fill > Brush to change the color

5. When done, click on the 'x' in the top right hand corner to apply the color change

6. Repeat these steps for each platform where you want to make a TMultiView fill color change

 

 


Read more
Viewing all 112 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>