PLUG'N SCRIPT
rapid plugin development
Tutorial
DSP
KUIML
How-to
Scripts
  • Overview
  • Tutorial
    • Hello world
    • Main skin and subskins
    • Displaying text
    • Changing text on the fly
    • Printing from the DSP
    • Displaying and controlling parameters
    • Params 101
  • Reference
  • Built-in variables
  • Runtime model
  • Parameters mapping
  • Script converter
  • LetiMix
KUIMLTutorialChanging text on the fly
March 30, 2021

Changing Text on the Fly

You can display not only "static" text, but also the contents of a STRING, like this:

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <SKIN>
  3. <STRING id="test_string" default="Hello there" />
  4. <CELL spacing="7">
  5. <TEXT string_id="test_string" width="200" text_h_align="left"/>
  6. <TEXT_EDIT_BOX string_id="test_string" width="200" change_on_type="true" />
  7. </CELL>
  8. </SKIN>

The STRING can be created in the GUI, or passed from/to DSP, using names like dsp.output_string0, dsp.input_string1, and so on.

In the example above, we used TEXT_EDIT_BOX to type in text, which is then displayed by a TEXT element.

Another way to manually change a string is to use TEXT_FIELD. Let's also demonstrate the TOOLTIP element:

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <SKIN>
  3. <STRING id="test_string" default="Click to change me" />
  4. <TEXT_FIELD string_id="test_string" width="200" text_h_align="left" font_weight="bold" />
  5. <TEXT value="I have a tooltip!" h_align="left" text_h_align="left">
  6. <TOOLTIP string_id="test_string" />
  7. </TEXT>
  8. </SKIN>

Printing from the DSP


Comments

Please, authorize to view and post comments.

2020 - 2026 © Site by LetiMix · Donate  |  Plug'n Script and KUIML by Blue Cat Audio