addFloatBox?

  • abief
  • abief's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • I'm here, there and elsewhere!
  • Posts: 95
  • Thank you received: 19

TPL_KUNENA_MESSAGE_CREATED addFloatBox?

04 Apr 2018 04: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)

Please Log in or Create an account to join the conversation.

  • FuniCapi
  • FuniCapi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 1889
  • Thank you received: 930

TPL_KUNENA_MESSAGE_REPLIED_NEW addFloatBox?

04 Apr 2018 07: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
The following user(s) said Thank You: abief

Please Log in or Create an account to join the conversation.

Moderators: ThornIG-Modellbau
Time to create page: 0.303 seconds
Powered by Kunena Forum