#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    8
    Rep Power
    0

    Multiplying Edit1.text and displaying in Edit2.text


    I want to multiply the text of one Edit Box by 1.5 and then display it into a second Edit box? It seems easy, but this is day 1 of using Delphi :-)

    I take it that it's not gonna be as easy as ...

    Code:
    Edit2.text := Edit1.text * 1.5;
    I'm too used to programming in Lingo I think :-)
    Thanks for your help!
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    8
    Rep Power
    0
    I sorted it out myself, using a link below. Thanks :-)

    Edit2.text := FloatToStr(StrToFloat(Edit1.text) * 1.5);
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    14
    Rep Power
    0
    haha...
    The incompatible type is not good...
    string and float....

    but.. the RXlib has a componet ...
    Your type is float...
    and you can use like you write in your question...
    [ ow my good.. my english language is terrible]

IMN logo majestic logo threadwatch logo seochat tools logo