Help me with VARIABLES please...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • geba
    Forum Member
    • Jul 2003
    • 3

    Help me with VARIABLES please...

    Hello guys
    I am new to the game of developing. I hope you can help me.

    I have 3 input boxes A, B, C
    I have 1 button 'result'

    In box A the value 4000
    In box B the value 3000
    I would like box C to display the result of box A - B when the button is pressed. How would I do this?

    I know this may be simple but I can't programme to save my life!

    Thanks in advance [img]/ubbthreads/images/icons/smile.gif[/img]
  • Derek
    Indigo Rose Customer
    • May 2001
    • 1254

    #2
    Re: Help me with VARIABLES please...

    Hi geba

    you are using simple mathematics here.
    so, in your 'button' OnClick event, the Actions list will give you the option to retrieve the text from the Edit Field Objects 1 & 2 and store it in a variable, with:

    <font color=green>%ObjectText1% = EditFieldObject[EditField1].GetText</font color=green>
    - and
    <font color=green>%ObjectText2% = EditFieldObject[EditField2].GetText</font color=green>

    all you need to do then is store the result of the subtraction in another variable after Evaluating it:

    <font color=green>%SubtractionResult% = Evaluate (%ObjectText1% - %ObjectText2%)</font color=green>

    and display the result in the third Edit Field Object

    <font color=green>EditFieldObject[EditField3].SetText ("%SubtractionResult%")</font color=green>

    Hope this helps [img]/ubbthreads/images/icons/smile.gif[/img]
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

    Comment

    • ovm
      Indigo Rose Customer
      • Oct 2002
      • 242

      #3
      Re: Help me with VARIABLES please...

      Otherwise,

      try this one.



      gr. Mario
      programming is very easy, just put the characters in the right order....

      Comment

      • geba
        Forum Member
        • Jul 2003
        • 3

        #4
        Re: Help me with VARIABLES please...

        Thank you both very much. The post and link you provided were fantastically useful for a 'non programmer' such as myself.

        Happy posting

        Comment

        Working...
        X