# Question:How do I freeze a window in a maplet

## Question:How do I freeze a window in a maplet

Maple

I have this code and to test if it works in TextField1 next to the label "MATRIZ A" I enter

[[1.3, 0.6200860, -0.5220232],[1.6, 0.4554022, -0.5698959],[1.9, 0.2818186,-0.5811571]]

and in TextField2 next to the label "x= " I enter 1.5

The problem is  I know it shows the right answer in the TextBox but it wipes out inmediately so I can´t really see the result.

How do I freeze the window ??? So that the content in the textbox stays still.

with (Maplets[Elements]):

with (Maplets[Elements]):
Herm:= proc() local A , M , v , v1 , n , i , j , k ,  x , s , Z ;
with(LinearAlgebra):
A:=convert(Maplets:-Tools:-Get('TfM'::list),Matrix);
x:=Maplets:-Tools:-Get('TfX'::numeric);
n:=RowDimension(A);
v:=DeleteColumn(A,2);
v1:=DeleteColumn(A,1);
M:=Matrix(2*n,2*n);
Z:=Matrix(2*n,1);
for i from 1 to n
do

Z[(2*i-1), 1]:= A[i,1];
Z[(2*i), 1]:= A[i,1];
M[(2*i-1), 1]:= A[i,2];
M[(2*i), 1]:= A[i,2];
M[(2*i-1), 2]:= A[i,3];
M[(2*i),2]:=Z[2*i,1]*(-1);

if i!=1 then
M[(2*i), 1]:= ( ( M[(2*i), 1] ) - ( M[(2*i)-1, 1] ) )/( ( Z[(2*i), 1] ) - ( Z[(2*i)-1,1 ] ) );
end if;
end do;
for i from 2 to ( (2*(n))+1 )
do
Maplets:-Tools:-Set('TbM(appendline)' = "  ");
for j from 2 to 3
do
if j=2 then
Maplets:-Tools:-Set('TbM(append)' = Z[i-1, 1]);
Maplets:-Tools:-Set('TbM(append)'="                  ");
end if;
Maplets:-Tools:-Set('TbM(append)' = M[i-1, j-1]);
Maplets:-Tools:-Set('TbM(append)'="                  ");

end do;
end do;
print(Z)   ;
print(M);
end proc:
maplet :=
Maplet('onstartup'='Action1','reference'='Maplet1',
Action('reference'='clickButton1',
Evaluate('function'='Herm()','target'='TbM','waitforresult'='true')),
Action('reference'='clickButton2',
Evaluate('function'='Limpiar()','waitforresult'='true')),
Return('reference'='Return1'),
Action('reference'='clickButton3',
Shutdown(`return`='Return1')),
Label('background'="#FFFFFF",'caption'="Matriz A ",'enabled'='true','foreground'="#000000",'reference'='LbA','visible'='true'),
TextField('background'="#FFFFFF",'editable'='true','enabled'='true','foreground'="#000000",'halign'='left','reference'='TfM','visible'='true','width'='32'),
Label('background'="#FFFFFF",'caption'="Valor de X",'enabled'='true','foreground'="#000000",'reference'='LbX','visible'='true'),
TextField('background'="#FFFFFF",'editable'='true','enabled'='true','foreground'="#000000",'halign'='left','reference'='TfX','visible'='true','width'='18'),
Button('background'="#FFFFFF",'caption'="Evaluar",'enabled'='true','foreground'="#000000",'onclick'='clickButton1','reference'='BnEvaluar','visible'='true'),
Label('background'="#D6D3CE",'caption'="MATRIZ",'enabled'='true','foreground'="#000000",'reference'='Label1','visible'='true'),
TextBox('background'="#FFFFFF",'editable'='true','enabled'='true','foreground'="#000000",'height'='20','reference'='TbM','visible'='true','width'='60','wrapped'='true'),
BoxLayout('background'="#D6D3CE",'border'='false','halign'='center','inset'='5','reference'='BoxLayout2','valign'='center','vertical'='true','visible'='true',
BoxRow(
BoxCell('hscroll'='never','value'='TbM','vscroll'='never'))),
BoxLayout('background'="#CCCCCC",'border'='true','caption'="  Algoritmo de Hermite  ",'halign'='center','inset'='5','reference'='BoxLayout1','valign'='center','vertical'='false','visible'='true',
BoxColumn(
BoxRow(
BoxColumn(
BoxRow(
BoxCell('hscroll'='never','value'='LbA','vscroll'='never'),
BoxCell('hscroll'='never','value'='TfM','vscroll'='never')),
BoxRow(
BoxCell('hscroll'='never','value'='LbX','vscroll'='never'),
BoxCell('hscroll'='never','value'='TfX','vscroll'='never'),
BoxCell('hscroll'='never','value'='BnEvaluar','vscroll'='never'))))),
BoxColumn(
BoxCell('hscroll'='never','value'='Label1','vscroll'='never')),
BoxColumn(
BoxCell('hscroll'='never','value'='BoxLayout2','vscroll'='never'))),
Window('layout'='BoxLayout1','reference'='Window1','resizable'='true','title'="Maplet"),
Action('reference'='Action1',
RunWindow('window'='Window1'))):

Maplets[Display](maplet);

﻿