PDA

View Full Version : number_column width



Stargrove
March 22nd, 2025, 19:45
In an XML file for a form I see:


<label_column name="label_mass">
<static textres="ref_label_mass" />
</label_column>

<number_column name="mass">
<readonly />
</number_column>


This shows up on a form with a label (name defined elsewhere) and a field to enter a number. What if I want the number field to be wider or how is its width even defined to begin with?

LordEntrails
March 22nd, 2025, 20:14
Not sure I understand the question.
If this helps, a table in a story has the following XML to define it's width. Note that it is a weight and not a number of pixels or window percentage.
<encounter>
<id-00001>
<name type="string">Story Table</name>
<text type="formattedtext">
<table>
<tr>
<td>Column 1</td>
<td colspan="2">Double Wide</td>
</tr>
</table>
</text>
</id-00001>
</encounter>

Stargrove
March 22nd, 2025, 20:45
I'm sorry. I am toying around with a form in a ruleset. I think I found my answer, but it took some digging through the files to find the right place to make the change so I cold set the size of the field.

This is the XML where the label and field are defined on a form for equipment:



<label_column name="mass_label">
<static textres="item_label_mass" />
</label_column>
<number_columnh name="mass" />


and I wanted to make the mass field wider to accommodate larger numbers.

I changed the XML to this:



<label_column name="mass_label">
<static textres="item_label_mass" />
</label_column>
<number_columnh name="mass" />
<anchored>
<size>
<width>80</width>
</size>
</anchored>
<readonly />
</number_columnh>


and was able to get the results I was interested in achieving. I am not sure this is the best way to do this or not.

I have attached before and after of what I was trying to do.

Moon Wizard
March 22nd, 2025, 23:33
Just pushed a new version of MGT2 ruleset to beta Test channel with Mass field width increased by 50% (40->60).

Regards,
JPG

Stargrove
March 23rd, 2025, 02:44
Just pushed a new version of MGT2 ruleset to beta Test channel with Mass field width increased by 50% (40->60).

Regards,
JPG

Dominic was going to specifically look into this, but thanks. I was just exploring to attempt to understand how things happen in the ruleset.