webButton helptags

Hi
Can helptags for webbuttons be added/modified at runtime (by code) ? because It seems that it’s possible only on the IDE.

Thanks

You should really get familiar with http://documentation.xojo.com

When you have this kind of question, look into the LR. The answer is here :
http://documentation.xojo.com/index.php/WebControl.HelpTag

I know what are helptags and how to use them, I’ve been using them on desktop.
there was something funny happening.

The LR clearly tells you they can be modified by code. Just like in Desktop.

I’m reopening this thread because I have a project in 2017r2.1 where WebButton.HelpTags can’t be changed at runtime.

If I write:

Button1.Caption = "Hello Whorled" Button1.HelpTag = "foobar"
The caption changes, but the button tooltip does not.

Does this require a page reload or something?

Here’s a workaround for this bug:

  1. Make a subclass of WebButton.
  2. Create a method (I called mine SetTitle – you could also use a Computed Property):

Public Sub SetTitle(title As String) Me.ExecuteJavascript("document.getElementById('" + Me.ControlID + "_inner').title='" + title + "';") End Sub
This works, and correctly sets the title (tooltip) of the button.

I haven’t tested this, but it would probably work for any WebControl