|
#11
|
||||
|
||||
|
Make an onchange for wizardform.diredit to update changes.
How to do one, Code:
procedure DirEditOnChange(Sender: TObject);
begin
lbl.caption:= ExpandConstant('Espaço do Game : ') + MbOrTb(24000);
end;
WizardForm.DirEdit.OnChange:= @DirEditOnChange;
Code:
Function NumToStr(Float: Extended): String;
Begin
Result:= Format('%.2n', [Float]); StringChange(Result, ',', ',');
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = ',')) and (Pos(',', Result) > 0) do
SetLength(Result, Length(Result)-1);
End;
function MbOrTb(Float: Extended): String;
begin
if Float < 1024 then Result:= NumToStr(Float)+' '+ 'MB'else
if Float/1024 < 1024 then Result:= NumToStr(Float/1024)+' '+'GB' else
Result:= NumToStr(Float/(1024*1024))+' '+'TB';
end;
Last edited by Razor12911; 13-06-2013 at 09:17. |
| The Following User Says Thank You to Razor12911 For This Useful Post: | ||
buttignol (14-06-2013) | ||
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup | REV0 | Conversion Tutorials | 129 | 21-05-2021 05:51 |
| INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup | REV0 | Conversion Tutorials | 51 | 26-03-2015 06:57 |
| Frequently Asked Questions | Joe Forster/STA | PC Games - Frequently Asked Questions | 0 | 29-11-2005 09:48 |