• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • CDP Studio - Design Mode Manual
  • Reusing Widgets

Language Support CDP Studio - Design Mode Manual

Reusing Widgets

Reusing Widgets

CDP Studio supports reusing widgets via libraries and scratchpad. Libraries often make sense if you want to create a reusable interface for underlying components in your library. For more information about scratchpad, see Scratchpad.

How to Store a Widget in a Library

Whenever a library project is opened, the Design mode widget box is populated with the library category where you can manage the widgets stored in a library. To add a widget to a library, just drag from the form editor and drop it on the library category. For each widget, a *.ui file is created under the library project. Once the library is deployed, the widget box is populated even when the library is closed, making it possible to use the widgets but not manage them.

How to Use a Widget from a Library

Deploy a library to ensure resources are available even when the library is not open. To reuse a widget from a library, simply drag it from the widget box and drop it on the form editor. You will notice the resulting widget is wrapped into a CDPBaseUiLoaderWidget with a uiFileName property referring to the *.ui file in a library. This is because we want to reuse the widget without making a copy of it. So all changes in a library will automatically be available once all dependent applications are redeployed. To be able to make a copy, it is possible to hold down the CTRL key and then drag and drop. Only then, the widget is not wrapped into a CDPBaseUiLoaderWidget, and you are free to make modifications without affecting other applications using the same widget.

Note: Remember to deploy the library! It is very easy to reuse a widget from an open library and then run the application and wonder why the widget didn't load. It is usually because the library was not deployed, thus deployed resources were not copied together with the application.

Language Support CDP Studio - Design Mode Manual

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top