# \[BUG\]Grouped Labels with Font Binding

**URL:** <https://forum.inductiveautomation.com/t/bug-grouped-labels-with-font-binding/58645>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [April 20, 2022, 5:48pm UTC](https://forum.inductiveautomation.com/t/bug-grouped-labels-with-font-binding/58645 "2022-04-20T17:48:45Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 21, 2022, 2:29pm UTC](https://forum.inductiveautomation.com/t/bug-grouped-labels-with-font-binding/58645/7 "2022-04-21T14:29:56Z")

</div>

> [@amarks](#):
>
> To get it to work I temporarily bind to a different text property until the format string matches the format that I want, and then right-click copy binding and right-click paste binding on the font property. It works for me.

I mean... so the actual issue here is that _you're allowed to do that_, not what happens on grouping. You've essentially discovered undefined behavior - it happens to work, until we do the grouping operation and recreate the components, at which point your manually injected bindings happen to disappear.

What I would do to accomplish the same goal, but faster (for you as a developer) is use a script to recursively walk the component tree and change every label component's font at once.

Starting from the code I posted here:

> [@Upgrade version makes buttons dissapear (possible bug?)](https://forum.inductiveautomation.com/t/upgrade-version-makes-buttons-dissapear-possible-bug/54921/14):
>
> For anyone finding/being linked to this thread in the future; if you want a ‘middle ground’ solution between a global UI manager key and setting every button up with scripting, you could use a technique like this to recursively modify every button in the window (e.g. in visionWindowOpened): from javax.swing import AbstractButton from com.inductiveautomation.ignition.client.IgnitionLookAndFeel import setBlendMode from de.javasoft.plaf.synthetica.util.Synthetica2DUtils import BlendMode def getCo…

You just need a different filter function:

```python
from com.inductiveautomation.factorypmi.application.components import PMILabel
isLabel = lambda component: isinstance(component, PMILabel)

```

And then your modification is as simple as setting the font:

```python
from java.awt import Font
win = system.gui.getWindow("yourWindow")
for label in filter(isLabel, getComponents(win)):
	label.font = Font("name", Font.PLAIN, 18)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/bug-grouped-labels-with-font-binding/58645)._
