cuetext for WebTextArea

Hi Guys,

Is there a way to create a custom properties to put CUETEXT on some control like WebTextArea?

Sub Shown() Handles Shown dim cuetext as String = "Hello, world !" self.ExecuteJavaScript("document.getElementById('"+me.ControlID+"').getElementsByTagName('textarea')[0].placeholder='"+cuetext+"'") End Sub


so that was it!

Thanks Michel it works!

You’re welcome.

Of course it works. I tested it before posting …


Hi Michel,

I tried it to use on WebPopupMenu but It show me an error.

dim cuetext as String = “Hello, world !”

What the wrong here?

Also, how did you know the STRING version of specific controls that you use in getElementsByTagName?

The code I posted is specific to WebTextArea. I won’t work for a WebPopupMenu.

BTW the underlying control for WebPopupMenu does not have cueText, because that is not a control where you enter text. Why would you want to put a cue text there ? Just set the value !

As for the exact HTML name of the underlying control, I look for it in the browser with the developers tools.

Hi Michel,

I use WebPopupMenu as COMBOBOX. I want the user to be informed that he need to select item from the list. So I want to put “REQUIRED” as cuetext.

Now I know!

Thanks MIchel!