Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1

THEMA:

addFloatBox? 04 Apr 2018 06:35 #1

  • abief
  • abiefs Avatar Autor
  • Offline
  • Expert Boarder
  • Expert Boarder
  • I'm here, there and elsewhere!
  • Beiträge: 95
  • Dank erhalten: 19
Hi,

How do you add a Float box to a form?

I need to add a parameter to my setups that represents the gearbox ratio and is a number with decimals, that needs to increase by 0.01.

The workarround I'm doing is to add an intbox with the value multiplied by 100, but I would like to know how to manage a number with decimals.

thanks,
Field ready: Taborca (3.4m), Ocelot (1.6m), Alula (0.6m).
Factory line: FVT-3 (1m), A6M Zero (1.6m), Tiger Moth (2.2m), Grumann Goose (2m) and Beechcraft D18 (1.5m).
Design phase: Szd-20x Wampir II (7.5m), Rutan Quickie (1.6m), both parked.
Dreaming: Weird push-pull called Double Trouble (2.4m)

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

addFloatBox? 04 Apr 2018 09:20 #2

  • FuniCapi
  • FuniCapis Avatar
  • Offline
  • Platinum Boarder
  • Platinum Boarder
  • Beiträge: 1664
  • Dank erhalten: 784
The value parameter of a intbox is always an integer. So you have to divide by 100 in your calculations. To print the intbox value as float with two decimal places, set the decimal parameter of the addintbox function to 2. The step size then is 0.01(step parameter = 1)

Lukas
Folgende Benutzer bedankten sich: abief

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Seite:
  • 1
Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.176 Sekunden
Powered by Kunena Forum