Problem Matrix in BP
Tom Verkerk
Hallo everyone,I have a problem to place on a Businesspartner Form a matrix on a new register.
When I use matrix in my script and I resize the from then the Matrix overwrite the buttons.
grid.SetSizeAndPosition(SwissAddonFramework.UI.Components.Matrix.GetFromUID(pVal.Form,"136"));
I have included a screendump.
Kind Regards
Tom Verkerk
Attachment
[url=http://www.coresystems.ch/wp-content/../wp-content/forum-image-uploads/t-verkerkdotcombusiness-nl/Screen01.JPG]Screen01.JPG[/url]
Michael Egloff
Hello Tom,can't you just make the grid smaller?
grid.Height = grid.Height - 50;
Tom Verkerk
Hello Michael,I can make the grid smaller, what I don't understand is why by opening a BusinessPartner the grid is OK and when I resize the BP Form than also change the grid in a total other size.
Can I make the size of the grid static?
Kind regards
Tom Verkerk
Michael Egloff
Hi Tom,I had on a customer system the same problem.
Solution:
Add another rule:
Optimizer
Type: CSharp
FormType: 134 (the one where your grid is placed on)
EventType: FormResize
FormModus: ALL
Code:
try
{
Grid grid = Grid.GetFromUID(pVal.Form, "YOUR_GRID_ID");
// SET THE POSITION AND SIZE OF THE GRID, e.g.
grid.SetSizeAndPosition(Matrix.GetFromUID(pVal.Form,"136"));
grid.Top += 25;
grid.Height -= 25;
}
catch(System.Exception ex)
{
MessageBox.Show("Errorrr: " + ex.Message, "OK");
}
return true;
0
Please sign in to leave a comment.
Comments
0 comments