Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
Pascal and Integer and Double |
Fri, Sep 21 2012 3:36 PM | Permanent Link |
Peter | Hello,
i'm not very familiar to Pascal, so i had a little trouble to center a panel on the desktop. My first attempt was: Panel1.Top := (Application.Desktop.Height - Panel1.Height) / 2; But EWB told me: [Error] unMain.wbs (51,19): Expected integer but instead found (Application.Desktop.Height - Panel1.Height) / 2 So i try around until i have this line: Panel1.Top := StrToInt(DoubleToStr((Application.Desktop.Height - Panel1.Height) / 2)); But i bet, there is a better way to do this. I'm right? Thanks in advance & Greetings ... Peter |
Fri, Sep 21 2012 4:29 PM | Permanent Link |
Eric Schwarz | In Pascal, A / B gives a real result, you want A div B
=================================================== =?ISO-8859-15?Q?Peter_T=FCbben?= wrote: Hello, i'm not very familiar to Pascal, so i had a little trouble to center a panel on the desktop. My first attempt was: Panel1.Top := (Application.Desktop.Height - Panel1.Height) / 2; But EWB told me: [Error] unMain.wbs (51,19): Expected integer but instead found (Application.Desktop.Height - Panel1.Height) / 2 So i try around until i have this line: Panel1.Top := StrToInt(DoubleToStr((Application.Desktop.Height - Panel1.Height) / 2)); But i bet, there is a better way to do this. I'm right? Thanks in advance & Greetings ... Peter |
Fri, Sep 21 2012 5:25 PM | Permanent Link |
Peter | Hello Eric,
> In Pascal, A / B gives a real result, you want A div B Cool. Thanks a lot! Greetings ... Peter |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |