Results 1 to 3 of 3

Thread: [RESOLVED] Negative

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    76

    Resolved [RESOLVED] Negative

    Hi there.... first of all thanks in advance!

    I'm trying to create a small application that does some calculation to two values and then prints out the total.... so far no problem it can add multiply subtract and divide... however what im stuck on is...

    how do i check wether the result is a negative value e.g. -2... because i want to change the colour to red in the label or textfield.

    thanks again

    steve
    Last edited by Stevanicus; Oct 13th, 2007 at 05:50 PM.

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Negative

    This should do it
    Code:
    if(result < 0)
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Posts
    76

    Re: Negative

    haha thanks worked like a treat! - i was trying to tackle a simple problem in the most complicated way! typical hehe

    thanks again!

    steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width