Save the new size of Tableview Row

After manually resizing a column of a Tableview (created with Solutionmodel and shown with showFormInDialog() ), i need
to save the new size and position of the column.

But the result of oFrm.getField(‘Test3’) shows the same before, and after the resize:

Field: Test3 anchors:11,background:null,borderType:“EtchedBorder,0,null,null”,dataProviderID:“band”,displayType:0,displaysTags:true,editable:true,fontType:null,
foreground:null,formIndex:0,format:null,groupID:null,height:21,horizontalAlignment:-1,margin:null,name:“Test3”,onAction:null,onDataChange:null,
onFocusGained:null,onFocusLost:null,onRightClick:com.servoy.j2db.scripting.solutionmodel.JSMethod@cb62cf,printSliding:0,printable:true,scrollbars:0,
selectOnEnter:false,styleClass:null,tabSeq:0,text:“band”,titleText:“band”,toolTipText:null,transparent:false,valuelist:null,verticalAlignment:-1,
width:44,x:48,y:18

How can i get the NEW values after the manually resize, movings (width:44, x:48, y:18)

Thanke you for any ideas.

The solutionModel contains the “blueprint” of the form, so you get all the sizes and locations of the fields as they were designed.

If you want the sizes in runtime, you should look under the elements node of your form, for example:

forms.yourform.elements.test3.getWidth()

Note that the name-property of the field/label/… should be filled in to be able to do this.

Puh, … not see the forest for the trees…

It works and its a great opportunity to creat perfect sized Tableviews on the fly during
the creation of a solution.

In case of isInDeveloper(), i store the size and position in a i18 row, so it is published to the
Servoyserver without care about forgeting it.

Thanke you Joas !

Joas:
The solutionModel contains the “blueprint” of the form, so you get all the sizes and locations of the fields as they were designed.
If you want the sizes in runtime, you should look under the elements node of your form

The size thing is clear now for me. Thanke you.

But i miss something like getAlignment() or getHorizontalAlignment(), or
i can use the setFont(spec), but there is no getFont().

This really doesnt exist under the elements node, or do i missunderstand something ?

Thanke you for an additional help for that issue.

stefanoni:
In case of isInDeveloper(), i store the size and position in a i18 row, so it is published to the
Servoyserver without care about forgeting it.
Thanke you Joas !

Now i see that this was not a realistic idea. The i18n.setI18NMessage(i18nKey, value) doesnt write
into the i18n repository, because it is used for other (override) reasons.

So i store my informations about “size and position” in a SQL-Table and now i look for a “automatic” way
to publish this data to the server during my “export Solution”, without care about forgeting it.

My question is: How can i deploy data to clients if they ar not stored in Form- or .js- Files ?

Thanke you for any suggestions.

stefanoni:

Joas:
The solutionModel contains the “blueprint” of the form, so you get all the sizes and locations of the fields as they were designed.
If you want the sizes in runtime, you should look under the elements node of your form

But i miss something like getAlignment() or getHorizontalAlignment(), or
i can use the setFont(spec), but there is no getFont().
This really doesnt exist under the elements node, or do i missunderstand something ?

I understand now, why nobody miss the getAlignment() or getHorizontalAlignment(). Im on wrong way…

The right way is just to get the current Form into a Solutionmodel again, then reading out the desired information,
then store it where ever i want.

Thanke you for help.