Changing text title in toolbar

Hi everyone

I am making a web app in which I have placed a toolbar. The toolbar contains text container. Now how do change the caption of the text dynamically thru coding??

Plz help.

Thanks in advance.

You can cycle through the items in a toolbar:

Example:
For i As Integer = 0 To Toolbar1.ItemCount-1

Next

You can typecheck and cast your container:
If Toolbar1.ItemAtIndex(i) isA WebContainerClassYouWant then
WebContainerClassYouWant(Toolbar1.ItemAtIndex(i)).Label1.caption = “yay”
END IF

Hi Brock

It’s not working. Can I send you the project file plz check that. If yes where to send it. Plz help. I am helpless

The Language Reference entry for WebToolbarButton.Caption has an example on how to change the caption in code:

http://documentation.xojo.com/index.php/WebToolbarButton.Caption

Thanks Brock

Worked great exactly what I wanted.

I can not thank you enough. You made my day bro.

Thanks a lot and best of luck.

Thanks Paul.

Working now.

Please, help me !!! Could you share the solution ? I have the same problem…