# Use lv\_label\_set\_text\_static instead of lv\_label\_set\_text for resource constrained systems

**URL:** <http://forum.squareline.io/t/use-lv-label-set-text-static-instead-of-lv-label-set-text-for-resource-constrained-systems/2078>\
**Category:** Feature requests\
**Created:** [November 13, 2023, 4:01pm UTC](http://forum.squareline.io/t/use-lv-label-set-text-static-instead-of-lv-label-set-text-for-resource-constrained-systems/2078 "2023-11-13T16:01:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shahbaz](http://forum.squareline.io/letter_avatar_proxy/v4/letter/s/43a26b/32.png) [@Shahbaz](http://forum.squareline.io/u/Shahbaz)\
**Post date:** [November 13, 2023, 4:01pm UTC](http://forum.squareline.io/t/use-lv-label-set-text-static-instead-of-lv-label-set-text-for-resource-constrained-systems/2078/1 "2023-11-13T16:01:18Z")

</div>

### What do you want to achieve?

The SL code generation is always using lv\_label\_set\_text for text. By default it should always use lv\_label\_set\_text\_static as that doesn’t use RAM and is way better for resource constrained systems.  
I understand there may be a use case for dynamic text, but in most cases the text never changes. My personal opinion is that all text should be static by default but the user can select whether they want the text to be dynamic (or SL can work that out itself).  
I notice this was requested previously in: [Static/placeholder labels? keyboard navigation groups?](https://forum.squareline.io/t/static-placeholder-labels-keyboard-navigation-groups/964) and you were quite keen.

### Do you see alternative options and workaround to achieve it?

We’re having to postporcess the squareline output to swap the API manually and it gets messy.

### Mention some use cases

---

<div class="post-metadata">

**Author:** ![Marian\_M](http://forum.squareline.io/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@Marian\_M](http://forum.squareline.io/u/Marian_M)\
**Post date:** [November 13, 2023, 5:06pm UTC](http://forum.squareline.io/t/use-lv-label-set-text-static-instead-of-lv-label-set-text-for-resource-constrained-systems/2078/2 "2023-11-13T17:06:39Z")

</div>

You mix static and const, what is complete different. static in C language is …

---

<div class="post-metadata">

**Author:** ![Hermit](http://forum.squareline.io/user_avatar/forum.squareline.io/hermit/32/971_2.png) [@Hermit](http://forum.squareline.io/u/Hermit)\
**Post date:** [November 21, 2023, 12:16pm UTC](http://forum.squareline.io/t/use-lv-label-set-text-static-instead-of-lv-label-set-text-for-resource-constrained-systems/2078/3 "2023-11-21T12:16:00Z")

</div>

Thank you for the idea. We’ll consider this as a possible upcoming SquareLine Studio feature.

---

<div class="post-metadata">

**Author:** ![CodeGrue](http://forum.squareline.io/letter_avatar_proxy/v4/letter/c/4491bb/32.png) [@CodeGrue](http://forum.squareline.io/u/CodeGrue)\
**Post date:** [February 27, 2024, 6:45pm UTC](http://forum.squareline.io/t/use-lv-label-set-text-static-instead-of-lv-label-set-text-for-resource-constrained-systems/2078/4 "2024-02-27T18:45:18Z")

</div>

This just needs to be a flag on the Label widget that exports lv\_label\_set\_text\_static instead of lv\_label\_set\_text

---

<div class="post-metadata">

**Author:** ![Hermit](http://forum.squareline.io/user_avatar/forum.squareline.io/hermit/32/971_2.png) [@Hermit](http://forum.squareline.io/u/Hermit)\
**Post date:** [March 1, 2024, 5:39pm UTC](http://forum.squareline.io/t/use-lv-label-set-text-static-instead-of-lv-label-set-text-for-resource-constrained-systems/2078/5 "2024-03-01T17:39:52Z")

</div>

Sure enough. And some mods to the project-processer and exporter code. The feature is in the ToDo list.
