cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
google44
Level 4

Clear edit box on click

Hi, I have an edit box with a preset text, I want to clear the text on the edit box when I click on it, how do i do that ? Something similar to a search box
Thanks
Labels (1)
0 Kudos
(5) Replies
thepeter
Level 7

You need to add the following events to the button that clears the edit box:
[CODE]Event | Argument | Condition
[EditBoxProperty] | "" | 1
[EditBoxProperty] | [EditBoxProperty] | 1[/CODE]

Alternatively you can use the Reset Control Event

Good luck!
0 Kudos
google44
Level 4

There is only one problem, I have a pure installscript project so the code above doesn't help me very much but thanks anyway, it was my mistake I didn't mention it first
0 Kudos
RobertDickau
Flexera Alumni

CtrlClear or CtrlSetText, perhaps?
0 Kudos
google44
Level 4

Yes, but how do I get the click event ? In fact that it's the real problem, how to know when a user click the edit box ?
I found those functions also but I don't know how to get the click event
0 Kudos
RobertDickau
Flexera Alumni

My mistake---I was fixated on clearing the control contents. Alas, I'm not sure InstallScript event handling takes note of focus changes. You can detect edit-field content changes and can change dialog focus programmatically, but I'm not aware of a way to detect the user's clicking in or tabbing to an edit field. Perhaps someone has a clever idea?
0 Kudos