Links

Formatted Text

Displays static formatted text with your choice of font style, horizontal and vertical alignment, and color.
If the widget has a datastream on, it can show its value via placeholder '/value/' put in the text option in settings.
A formatted label for the widget is optional.

Datastream

Select or create a datastream of data type integer, double, enumerable, string. The datastream is used to insert a corresponding value inside the text the widget is showing, and for holding and assigning the widget properties of vertical and horizontal alignment, font style and color.

Widget Controls

The widget has no controls.

Widget Settings

  • Text - the formatted text you want to appear in the widget. Alignment as left, center, right justified can be assigned in Design tab. Use placeholder '/value/' to show the datastream value inside the text.

Widget Design

  • Title - the widget label that appears above the formatted text.
  • Value - format options for the displayed text assigned under ‘Settings’. Font style, horizontal & vertical alignment, and text color.

How to process widget with the hardware

Not applicable. This widget only displays the text and the datastream value, it does not allow it to be changed from the UI.

Change Widget Properties

You can change certain properties of the Widget from your hardware. For that, use this command:
Blynk.setProperty(vPin, "widgetProperty", "propertyValue");
Where:
  • vPin is: virtual pin number the widget is assigned to
  • widgetProperty: property you want to change
  • propertyValue: value of the property you want to change
Don't put Blynk.setProperty()into the void loop() as it can cause a flood of messages and your hardware will be disconnected. Send such updates only when necessary, or use timers.

Properties you can change

You can change the properties label, color, isDisabled, isHidden of the widget from your hardware, or via an HTTP API. The URL must be encoded, so spaces in labels must be replaced with %20, and color hexadecimal values in the HTTP API URL must include the hash # character urlencoded as %23.

Change Widget Label

Blynk.setProperty(V1, "label", "Select");

Set Color

//#D3435C - Blynk RED
Blynk.setProperty(V1, "color", "#D3435C");

Disable/Enable

Widget will be greyed out on UI and users won't be able to tap on it.
Blynk.setProperty(V1, "isDisabled", true);

Show/Hide

Widget will be hidden from dashboard. Design your UI so that it doesn't look weird when there is no widget.
Blynk.setProperty(V1, "isHidden", true);

Change widget properties via HTTPs API

get
https://{server_address}
/external/api/update/property?token={your 32 char token}&pin={your vPin}&{property}={value}
Updates the Datastream Property and all assigned Widgets

Sync to the latest known state

You can update your hardware to the latest datastream value from Blynk.Cloud after your hardware went offline, and then came online again. Use Blynk.syncVirtual() to update a single virtual pin, or Blynk.syncAll() to update all virtual pins. See State Syncing for more details.
BLYNK_CONNECTED() {
// Called when hardware is connected to Blynk.Cloud
// get the latest value for V1
Blynk.syncVirtual(V1);
// Request Blynk server to re-send latest values for all pins
Blynk.syncAll()
}
Last modified 5mo ago