# How can I remove dynamic Property?

I make a function name as IncrementInputFieldsCreation.

  (*Option*)
Options[IncrementInputFieldsCreation]:={partion->All,rowsInputFields-> 1};
(*Defination*)
IncrementInputFieldsCreation[noOfInputFields_,OptionsPattern[]]:=
(
Module[{inputvaluelist=Null},
(*it checks wheather noOfInputFields value is 0 or not*)
If[
(noOfInputFields>0),
(*If noOfInputFields value is greater than 0*)
(inputvaluelist=Table[0,{noOfInputFields},{OptionValue[rowsInputFields]}];
(*output*)
output={
Table[
(
With[{i=i,j=j},
(Row[{
Column[{
MouseAppearance[
EventHandler[
Style["\[FilledUpTriangle]",Bold,Black,{15,15}],
{"MouseClicked":>(inputvaluelist[[i,j]]=inputvaluelist[[i,j]]+1)}
],
],
MouseAppearance[
EventHandler[
Style["\[FilledDownTriangle]",Bold,Black,{15,15}],(*Button Next to InputField For Decrement *)
{"MouseClicked":>(If[
(inputvaluelist[[i,j]]>0),
(inputvaluelist[[i,j]]=inputvaluelist[[i,j]]-1),
(inputvaluelist[[i,j]]=0)
]
)
}
],
]
},
Spacings->0,
Alignment->Center,
Background->RGBColor[0.65,0.65,0.65]
],
InputField[
Dynamic[inputvaluelist[[i,j]]],
Number,
ContinuousAction->True,
ImageSize->{50,20},
Alignment->Center
]
}](*Row is closed here*)
)
]
(*with is closed*)
),
{i,1,Length[inputvaluelist]},
{j,1,Length[Part[inputvaluelist,i]]}
],(*Table closed*)
Dynamic[inputvaluelist]
};
Part[output,OptionValue[partion]]
),
("")
](*If Closed here*)
](*Module closed*)
)


case1:

IncrementInputFieldsIncrementInputFieldsCreation[3,rowsInputFields -> 4]


If you call that function in the above way,we will get list of InputFields and InputFieldValues. and also if you can click on upArrowbutton (beside of the InputField) the value of the InputField will be increased like that in opposite way downArrowbutton will work..

case2:

value = 1;
Dynamic[IncrementInputFieldsIncrementInputFieldsCreation[value,
rowsInputFields -> 4]]}


in case2, dynamically we will get list of InputFields and InputFieldValuesdepending upon the PopupMenu value.

but problem is,dynamically the upArrow,downArrow buttons are not working...

I think in case2,dynamically function is evaluated everytime so because of that it's not working..

how can I overcome this?

-
Did you try Setting? – PlatoManiac Jan 22 at 18:21
sorry I don't know what Setting? – subbu Jan 22 at 18:27
Check the documentation for it. It helps you to retrieve value stored in a Dynamic variable. In your above code why dont you use DynamicModule in place of Module? – PlatoManiac Jan 22 at 18:32
I tried with DynamicModule also ,still not get it.. – subbu Jan 22 at 18:37
If you change Module to DynamicModule and remove the context name IncrementInputFields from the function name you get something that works as expected in Version 9 (MS Vista 64bit). – kguler Jan 22 at 19:55