I want to have field hints in a 3 x 2 grid input fields, such that there is one hint specific to the input fields in the 1st column and another one for the 2nd column.

I also want to adjust the field size of the two columns.


1.Should the value of InputField be a string if FieldHint is used. (As shown in Figure 1)

InputField["", String, FieldHint -> "Enter Text here"]
InputField["", Number, FieldHint -> "Enter Number here"]

2.Is this a better way to manage a grid properties (As shown in figure 2)

InputField["", String, FieldHint -> "Enter Force", 
FieldSize -> {w, h}], {h, {1, 1, 1, 1}}, {w, {5, 3}}]] 

3.Does assigning a grid to a variable and manipulating the variable make sense. If not what are the other ways to implement this logic.(As shown in figure 3)

enter image description here

  • $\begingroup$ Hi, welcome to Mathematica.SE, please take the tour. Here its considered helpful and polite show you own efforts and share your data and code attempts in a well formatted form, so we can quickly see the problem you are facing. Please help us to help you abd edit your question accordingly. Only good questions inspire great answers. $\endgroup$
    – rhermans
    Sep 11, 2015 at 13:02
  • 3
    $\begingroup$ Sai, can you show us what code you have produced so far, so that we can understand your goal better, and modify your existing code to suit your purposes? $\endgroup$
    – MarcoB
    Sep 11, 2015 at 13:14

1 Answer 1

dims = {3, 2};
a = ConstantArray[Null, dims];
fieldH = Array ["Hint " <> ToString@# &, dims[[2]]];
fieldS = Array [ 10 # &, dims[[2]]];
                   FieldSize -> fieldS[[#2]],  
                   FieldHint -> fieldH[[#2]]] &, 

Mathematica graphics


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.