Why not using a tooltip for the info about the edit field?
Change
ObjectSetInteger(0, objName, OBJPROP_READONLY, false);
to
ObjectSetInteger(0, objName, OBJPROP_READONLY, true);
if you then want to be able to edit afterwards add in OnChartEvent
if (id == CHARTEVENT_OBJECT_CLICK) { if (ObjectType(sparam)==OBJ_EDIT) { ObjectSetString(0, sparam, OBJPROP_TEXT, ""); ObjectSetInteger(0, sparam, OBJPROP_READONLY, false); }
.
Thanks, half the issue is solved! :)
By the way, can you explain me why I need to set it to read-only first?
Now the edit field is clear but it is not active. Is there another object property to activate it which I don't know yet?
Edit: I just noticed it works with a double click. Any chance to active it by a single click?
By the way, can you explain me why I need to set it to read-only first?
I think that it has something to do with the box expecting an input.
Now the edit field is clear but it is not active. Is there another object property to activate it which I don't know yet?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi coders,
is it somehow possible to delete the text in an OBJ_EDIT when clicking on it? I want to avoid a label as a description for that edit box and so I want to place the description right inside the edit box which should disappear when I click on it.
I tried it this way but it doesn't work: