addFloatBox?

  • abief
  • abief's Avatar Offline Autor
  • Premium Mitglied
  • Premium Mitglied
  • I'm here, there and elsewhere!
  • Beiträge: 95
  • Dank erhalten: 19

addFloatBox? wurde erstellt von abief

Posted 04 Apr. 2018 06:35 #1
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)
von abief

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • FuniCapi
  • FuniCapi's Avatar Offline
  • Platinum Mitglied
  • Platinum Mitglied
  • Beiträge: 1714
  • Dank erhalten: 836

FuniCapi antwortete auf addFloatBox?

Posted 04 Apr. 2018 09:20 #2
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
von FuniCapi
Folgende Benutzer bedankten sich: abief

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Moderatoren: ThornIG-Modellbau
Ladezeit der Seite: 0.989 Sekunden