Hi all, I'm facing this problem for years and would like to know if anyone found a proper solution to it. I have 2 subforms on a document like form (similar to sales invoice), just that I added another form in a new tab (next to Application tab) of main form. The problem occurs when resizing the main form, I would like that both subform encrease evenly without colliding to each other. Any help much appreciated.
0
Comments
See the HorzGlue and VertGlue for the subforms in the Main form set them to both.
Hope this helps
Albert
A solution of sorts to avoid the colliding is to set the top form glue properties to Both,Top - middle one to Both, Both and bottom one to Both,Bottom. This will strech all form width wise and the middle form only verticle wise.
What is the layout you want to acheive?
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
The only solution I can think of is to use the idea I got from a download from this site (which I can find at the moment).
The idea is to add code in the ontimer trigger which gets the size of the form and the sizes the control by C/AL Code
e.g.
// Remember these values for next time trigger goes of
intFormStandardWidth := CurrForm.WIDTH;
intFormStandardHeight := CurrForm.HEIGHT;
// width,Heigth of a button
intButtonWidth := ROUND(intFormStandardWidth / intNoOfColumns,1,'<');
intButtonHeight := ROUND(intFormStandardHeight / intNoOfRows,1,'<');
// Position all buttons, set their height and width
GetXYPos(001,intXPos,intYPos);
CurrForm.TextBox1.WIDTH := intButtonWidth; CurrForm.TextBox1.HEIGHT := intButtonHeight;
CurrForm.TextBox1.XPOS := intXPos; CurrForm.TextBox1.YPOS := intYPos;
Hope this helps
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
columnname OnDeactivate
ResizeSubform;
ResizeSubform()
Currform.subform.FORM.SetColum(1,column1.Width);
Currform.subform.FORM.SetColum(2,column2.Width);
etc
SUBFORM
SetColum(var Col, Width)
CASE COL OF
1 : CurrForm.column1.WIDTH := Width
2 : CurrForm.column2.WIDTH := Width
etc.
CurrForm.UPDATECONTROLS;
Tedious coding but once done it works.