Is it possible to change TextCells in the following code in that way, that the TextCell "profile starts at x =" changes to "profile starts at y =" and at the same time the TextCell "measurement starts at y =" changes to "measurements starts at x =" when the input of the user is "y" in the TextCell "direction of the profile (x / y)"?
Moreover I don't know why "TextAlignment -> Right" has no effect...
Here is the code:
code = ""; ffn = ""; lfn = ""; add = 0; direction = "x"; rs = ""; \
length = ""; startmeasurement = ""; distance = "";
DialogInput[
Grid[{{Grid[{{TextCell["Code (004p):", FontSize -> 16,
TextAlignment -> Right],
InputField[Dynamic[code], String,
FieldSize -> {10, 1}]}}]}, {Grid[{{TextCell[
"first filenumber:", FontSize -> 16, TextAlignment -> Right],
InputField[Dynamic[ffn], Number, FieldSize -> {10, 1}],
TextCell["last filenumber:", FontSize -> 16,
TextAlignment -> Right],
InputField[Dynamic[lfn], Number, FieldSize -> {10, 1}],
TextCell["addition to filenumber", FontSize -> 16,
TextAlignment -> Right],
InputField[Dynamic[add], Number, FieldSize -> {10, 1}]},
{TextCell["direction of the profile (x / y):", FontSize -> 16,
TextAlignment -> Right],
InputField[Dynamic[direction], String, FieldSize -> {2, 1}],
TextCell["profile starts at x =", FontSize -> 16,
TextAlignment -> Right],
InputField[Dynamic[rs], Number, FieldSize -> {10, 1}],
TextCell["length of the profile [m]:", FontSize -> 16,
TextAlignment -> Right],
InputField[Dynamic[length], Number, FieldSize -> {10, 1}]},
{TextCell["measurement starts at y =", FontSize -> 16,
TextAlignment -> Right],
InputField[Dynamic[startmeasurement], Number,
FieldSize -> {10, 1}],
TextCell["Distance between profiles (+0.5 / -0.5):",
FontSize -> 16, TextAlignment -> Right],
InputField[Dynamic[distance], Number, FieldSize -> {10, 1}]}},
Frame -> All],
DefaultButton[DialogReturn[og]]}}],
NotebookEventActions -> {"ReturnKeyDown" :>
FrontEndExecute[NotebookWrite[InputNotebook[], "\n"]]}];
Thanks a lot for your help.