I have searched and I see very limited documentation about this. I want to change the panel captions from Page 0 - Page 1 - Page 2 - etc To something more descriptive. I have found one article that states use a method and assign the caption with the pagepanel.value call. However, .Value is not in my list of options.
Is anyone updating these captions and can share how they are doing it since it still isnt configurable in the IDE?
and @Ricardo_Cruz of course…
I’m assuming you mean the tab captions in a WebTabPanel as WebPagePanels have no visible captions in the browser. If not, sorry for the noise.
To change the tab captions at runtime, add this method to a module and call from the Shown event:
Public Sub TextAt(extends t as WebTabPanel, index as Integer, assigns caption as String)
if index < 0 or index > t.PanelCount then Return
'// Use a JSONItem to escape and clean the string
var j as new JSONItem
j.Value( "caption" ) = caption
var exec() as String
exec.Add( "var j = " + j.ToString + ";" )
exec.Add( "$('#" + t.ControlID + "_tab_" + index.ToString + "').html(j.caption);" )
TabPanel1.TextAt( 0 ) = "Test"
Are you talking about these captions?
There is no way to change them using the IDE (as you already said) and those captions are not visible in the browser (as Anthony said).
If Xojo is going to allow changing the name, how we will match Page 0 with the control showing 0 (or 1, 2, etc.) in the IDE?
Edit: Thank you Anthony, it looks like Xojo is missing a way to change the Tabs caption at run time.