(form "00530" (size 68 20)
  (heading "Surface or Solid Colour Banding")
  (field "draw_type" (position  2  3) (display_length 12) (input disallowed))

   (label (position  2  5) (text "Object Range"))
  (label (position  2  6) (text "Trisol Range"))
  (label (position  2  7) (text "Triangle Range"))
  (label (position 2 8) (text "Field to colour by"))
  (label (position 2  10) (text "Banding type"))
  (label (position  3 11) (text "0 = none"))
  (label (position  3 12) (text "1 = bands of specified size"))
  (label (position  3 13) (text "2 = set number of bands"))
  (label (position  3 14) (text "3 = range for bands"))
  (label (position 3 16) (text "Size of bands or range"))
  (field "range1" (position 17  5) (display_length 10) (input allowed)
    (null allowed) (max_length 32)
    )
  (field "range2" (position 17  6) (display_length 10) (input allowed)
    (null allowed) (max_length 32))
  (field "range3" (position 17  7) (display_length 10) (input allowed)
    (null allowed) (max_length 32)
    (dependency (value "false_colour_type") == "4"))
  (field "grade_field" (position  17  8) (display_length  10) (input allowed)
    (max_length 30) (null disallowed) (format string_field)
    )
  (field "false_colour_type" (position 17  10) (display_length  1) (input allowed)
    (value_in "0" "1" "2" "3" "4")
    (format integer_4) (null disallowed) (max_length 1)
    )
  (field "slice_size" (position 3 17) (display_length 20) (input allowed)
    (translate upper) (format real_8) (null disallowed) (max_length 10)
    (dependency (value "false_colour_type") == "1")
    )
  (field "grade_range" (position  3 17) (display_length  20) (input allowed)
    (format range) (null disallowed) (max_length 256)
    (dependency (value "false_colour_type") == "3")
    )

 (scroll_block "colours" (position  33 11) (size 30 7)
  (extra  0  1)
  (repeat interactive (grow  0  1) (instances  12 (min  1) (max 100)))
  (top
   (label (position  1  0) (text "Index"))
   (label (position 10  0) (text "Colour"))
   (label (position 20  0) (text "Triangle value"))
   )
  (main
   (label (position  1  00) (text "01"))
   (label (position  1  01) (text "02"))
   (label (position  1  02) (text "03"))
   (label (position  1  03) (text "04"))
   (label (position  1  04) (text "05"))
   (label (position  1  05) (text "06"))
   (label (position  1  06) (text "07"))
   (label (position  1  07) (text "08"))
   (label (position  1  08) (text "09"))
   (label (position  1  09) (text "10"))
   (label (position  1  10) (text "11"))
   (label (position  1  11) (text "12"))
   (label (position  1  12) (text "13"))
   (label (position  1  13) (text "14"))
   (label (position  1  14) (text "15"))
   (label (position  1  15) (text "16"))
   (label (position  1  16) (text "17"))
   (label (position  1  17) (text "18"))
   (label (position  1  18) (text "19"))
   (label (position  1  19) (text "20"))
   (label (position  1  20) (text "21"))
   (label (position  1  21) (text "22"))
   (label (position  1  22) (text "23"))
   (label (position  1  23) (text "24"))
   (label (position  1  24) (text "25"))
   (label (position  1  25) (text "26"))
   (label (position  1  26) (text "27"))
   (label (position  1  27) (text "28"))
   (label (position  1  28) (text "29"))
   (label (position  1  29) (text "30"))
   (label (position  1  30) (text "31"))
   (label (position  1  31) (text "32"))
   (label (position  1  32) (text "33"))
   (label (position  1  33) (text "34"))
   (label (position  1  34) (text "35"))
   (label (position  1  35) (text "36"))
   (label (position  1  36) (text "37"))
   (label (position  1  37) (text "38"))
   (label (position  1  38) (text "39"))
   (label (position  1  39) (text "40"))
   (label (position  1  40) (text "41"))
   (label (position  1  41) (text "42"))
   (label (position  1  42) (text "43"))
   (label (position  1  43) (text "44"))
   (label (position  1  44) (text "45"))
   (label (position  1  45) (text "46"))
   (label (position  1  46) (text "47"))
   (label (position  1  47) (text "48"))
   (label (position  1  48) (text "49"))
   (label (position  1  49) (text "50"))
   (label (position  1  50) (text "51"))
   (label (position  1  51) (text "52"))
   (label (position  1  52) (text "53"))
   (label (position  1  53) (text "54"))
   (label (position  1  54) (text "55"))
   (label (position  1  55) (text "56"))
   (label (position  1  56) (text "57"))
   (label (position  1  57) (text "58"))
   (label (position  1  58) (text "59"))
   (label (position  1  59) (text "60"))
   (label (position  1  60) (text "61"))
   (label (position  1  61) (text "62"))
   (label (position  1  62) (text "63"))
   (label (position  1  63) (text "64"))
   (label (position  1  64) (text "65"))
   (label (position  1  65) (text "66"))
   (label (position  1  66) (text "67"))
   (label (position  1  67) (text "68"))
   (label (position  1  68) (text "69"))
   (label (position  1  69) (text "70"))
   (label (position  1  70) (text "71"))
   (label (position  1  71) (text "72"))
   (label (position  1  72) (text "73"))
   (label (position  1  73) (text "74"))
   (label (position  1  74) (text "75"))
   (label (position  1  75) (text "76"))
   (label (position  1  76) (text "77"))
   (label (position  1  77) (text "78"))
   (label (position  1  78) (text "79"))
   (label (position  1  79) (text "80"))
   (label (position  1  80) (text "81"))
   (label (position  1  81) (text "82"))
   (label (position  1  82) (text "83"))
   (label (position  1  83) (text "84"))
   (label (position  1  84) (text "85"))
   (label (position  1  85) (text "86"))
   (label (position  1  86) (text "87"))
   (label (position  1  87) (text "88"))
   (label (position  1  88) (text "89"))
   (label (position  1  89) (text "90"))
   (label (position  1  90) (text "91"))
   (label (position  1  91) (text "92"))
   (label (position  1  92) (text "93"))
   (label (position  1  93) (text "94"))
   (label (position  1  94) (text "95"))
   (label (position  1  95) (text "96"))
   (label (position  1  96) (text "97"))
   (label (position  1  97) (text "98"))
   (label (position  1  98) (text "99"))
   (label (position  1  99) (text "100"))
   (field "colour" (position  10  0)
    (display_length 16) (input allowed) (format colour)
    (translate lower) (null allowed) (max_length 512)
    )

   (field "expression" (position  20  0)
    (display_length 16) (input allowed)
    (dependency (value "false_colour_type") == "4")
    (translate none) (null allowed) (max_length 128)
   )

   (field "label" (position  20  0)
    (display_length 16) (input allowed)
    (dependency (value "false_colour_type") == "4")
    (translate none) (null allowed) (max_length 16)
   )

   )
  )

  (label (position  2  4) (text "Layer name"))
  (field "layer_name" (position 17  4) (display_length 25) (input allowed)
    (null allowed) (max_length "APP_MAX_LAYER_NAME_LENGTH")
    )

 (default_buttons)
)
