# Editing unit label text size

**URL:** <https://forum.vassalengine.org/t/editing-unit-label-text-size/90190>\
**Category:** Module Discussion\
**Created:** [June 4, 2026, 9:00am UTC](https://forum.vassalengine.org/t/editing-unit-label-text-size/90190 "2026-06-04T09:00:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveRowe](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@SteveRowe](https://forum.vassalengine.org/u/SteveRowe)\
**Post date:** [June 4, 2026, 9:00am UTC](https://forum.vassalengine.org/t/editing-unit-label-text-size/90190/1 "2026-06-04T09:00:52Z")

</div>

This is a question for users and module designers.

One module I play is the ECW game For King & Parliament and I have a problem with the amount of space available for unit information text.

For every unit and commander there are two lines where you can add or change text. For a commander, it’s “right click” and the screen menu gives you Generals name line 1 and line 2. For a unit, the “right click” screen menu is unit name line 1 and line 2. With current text size on screen I’m limited as to how much information I can put one a unit before text line lengths expand into adjacent map boxes and overlap text on those units.

My question is how do I use module edit facilities so I can reduce the size and font of any text appearing on screen ?.

Thanks for any help received that points me in the right direction.

---

<div class="post-metadata">

**Author:** ![cholmcc](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/cholmcc/32/8319_2.png) [@cholmcc](https://forum.vassalengine.org/u/cholmcc)\
**Post date:** [June 4, 2026, 1:14pm UTC](https://forum.vassalengine.org/t/editing-unit-label-text-size/90190/2 "2026-06-04T13:14:31Z")

</div>

> [@SteveRowe](#):
>
> One module I play is the ECW game For King & Parliament

Do you mean the module [For King and Parliament](https://vassalengine.org/library/projects/For_King_and_Parliament)? Please remember to give a link to the project page when reporting on a specific module or project. That really helps others see and understand what you are talking about, and thus better help you.

> [@SteveRowe](#):
>
> My question is how do I use module edit facilities so I can reduce the size and font of any text appearing on screen ?.

In the prototype [Text Label](https://vassalengine.org/doc/latest/ReferenceManual/Label.html#top) traits.

- Remove the _Menu command_
- Remove the _Key command_

For the specific [Text Label](https://vassalengine.org/doc/latest/ReferenceManual/Label.html#top) traits some specific changes need to be done. Let us take the first line of the unit name. In that [Text Label](https://vassalengine.org/doc/latest/ReferenceManual/Label.html#top) traits do

- Change the _Label text_ to

```auto
 {GetString("UnitName1").substring(0,Math.min(UnitName1.length(),10))}

```

(this ensures that only 10 characters are shown. Adjust as needed).
- Change the _Property name_ to `UnitName1_Value`  
Do the same for the other [Text Label](https://vassalengine.org/doc/latest/ReferenceManual/Label.html#top) but use a piece unique property name (e.g., `UnitName2` for the second line of the unit name).

For each [Text Label](https://vassalengine.org/doc/latest/ReferenceManual/Label.html#top) in the piece prototypes (using `UnitName1` above as an example)

- add a [Dynamic Property](https://vassalengine.org/doc/latest/ReferenceManual/DynamicProperty.html#top) trait:
  - _Property name_: `UnitName1`
  - Add a key command (press the ➕ sign)
    - _Menu command_: `Set unit name`
    - _Key command_: `Ctrl-L`
    - _Type_: `Prompt user`
    - _Prompt_: `Input unit name (max 10 characters)`  
(adjust the above prompt to the number of characters you will display).

(perhaps you want a shared prototype - say `Named` - that is included in both the `Unit` and `General` prototypes - that only has these traits).

The logic is as follows:

- The [Text Label](https://vassalengine.org/doc/latest/ReferenceManual/Label.html#top) takes the _string_ value (`GetString`) of a property (for example, `UnitName1`), and then chops it to be no longer than 10 characters long (adjust as you see fit).
- The [Dynamic Property](https://vassalengine.org/doc/latest/ReferenceManual/DynamicProperty.html#top) traits allows users to set the property (say `UnitName1`) to some value, warning the user to not exceed 10 characters (adjust as you see fit). Note, the limit on the number of characters is _not_ enforced, and the property will have what ever value the user gave it, but only the selected number of characters will be shown underneath the piece.

If you make these changes and upload to the Game library, remember to set the module version according to the [semantic versioning](https://semver.org) standard: _major_`.`_minor_`.`_patch_ . You may need to contact the current owner @Edwin11 (click the user name and then the big blue Message button) to add you as an owner so that you may upload to the project.

Yours,  
_Christian_

---

<div class="post-metadata">

**Author:** ![SteveRowe](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@SteveRowe](https://forum.vassalengine.org/u/SteveRowe)\
**Post date:** [June 4, 2026, 2:06pm UTC](https://forum.vassalengine.org/t/editing-unit-label-text-size/90190/3 "2026-06-04T14:06:49Z")

</div>

Christian,

Many thanks for the help, I found what I needed to do from following your pointers. Managed to go into Prototype Unit Traits and edit the text size number in the box so Unit information appeared smaller on screen. I also made the text Bold Face so they can be read more easily.

I saved the edited version and opened it to see how the changes look and everything is much better for my personal tastes.

I’ll take your advice and contact Edwin to see if he’d allow me to have my edited version included on the Vassal module page.

Again many thanks for your help,

Steve Rowe
