PDA

View Full Version : help: put a string in a edit field..?



Michka88
01-18-2005, 01:14 PM
ok as you can see in the attached picture i got an edit field with an button next to it and an second fiel whis is not of importance...

what i wanted to ask was fist is it possible to make that you can not edit that first "edit field" (verification number)

and is it possible to let the installer automatically put the result string that is generated from this global function:
result = Math.Random(50000000, 99999999);

so what i want to do is that the edit field is Not editable but that you can copy the random number and that the random number is shown in the field...

could anybody help me with that?
thx in advance

Brett
01-18-2005, 02:13 PM
To make the edit field uneditable, just go to the screen properties and in the list of Edit Fields at the bottom, double click on the CTRL_EDIT_01 item. Then in the Edit Field Properties screen uncheck the Enabled checkbox (at the bottom right corner). This will disable the field. The down-side is that they will not be able to select the text and copy it to the clipboard either.

To set the string as the edit field text use this script in the On Preload event of the screen:



result = Math.Random(50000000, 99999999);
DlgEditField.SetProperties(CTRL_EDIT_02,{Text=resu lt});

Michka88
01-18-2005, 02:26 PM
thank you alot :)