typestar

Números y texto que el usuario puede editar en Igor Pro

SetVariable liga un control a una global, así el valor sobrevive al clic.

Function AddFields()
    NVAR threshold = root:Settings:gThreshold
    SVAR label = root:Settings:gLastFile

    SetVariable thrSet, pos={16, 80}, size={200, 18}, bodyWidth=70
    SetVariable thrSet, title="Threshold", value=threshold
    SetVariable thrSet, limits={0, 10, 0.1}, proc=ThresholdChanged

    SetVariable nameSet, pos={16, 104}, size={280, 18}
    SetVariable nameSet, title="File", value=label
End

Cómo funciona

  1. value= nombra la global que el control lee y escribe.
  2. limits={low, high, step} lo acota y fija el incremento de las flechas.
  3. bodyWidth= mantiene la caja en un ancho sensato junto a un título largo.

Palabras clave y builtins usados aquí

El intento, en números

Líneas
11
Caracteres a escribir
384
Tokens
97
Ritmo de tres estrellas
85 tpm

Al ritmo de tres estrellas de 85 tokens por minuto, este intento toma unos 68 segundos.

Escribe este fragmento

Paso 1 de 5 en Valores que fija el usuario; paso 4 de 18 en Paneles y GUI.

← Anterior Siguiente →