[SOLVED] Help with tablayout.gettitle() lazarus / 43-Android ---------------------------------------------------------------------- Narciso · 2025-01-24 16:29 in this procedure S (VAriable) result always '' (Nullstring) , WHY? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function TAndroidModule1.TabExists(itemTitle: string): Boolean;var  i: Integer;  s: string;begin  Result := False;  for i := 0 to TabLayout1.GetTabCount() - 1 do  begin    s:= TabLayout1.GetTitle(i);    showmessage(s+' = '+ itemtitle);    if s = itemTitle then    begin    Result := True;      Break;    end;  end; ---------------------------------------------------------------------- c4p · 2025-02-01 09:32 TabLayout1.GetTitle does not appear to return the tab title in LAMW unfortunately, which is why you have run into this issue, I ran into that too, a possible (messy) workaround is when you add (or remove) your tabs like Tablayout1.AddTab('TitleName') to put the title text into a TStringList, or something similar at the same time and then search through that list instead to see if the tab title exists? ---------------------------------------------------------------------- Narciso · 2025-02-01 16:26 very strange , a function that do nothing but exists.. thank you for suggest, i also think that the simplest way is a support stringlist, but its very nasty. ---------------------------------------------------------------------- jmpessoa · 2025-02-01 21:38 Fixed! added the missing ""GetTitle" to file  "jsTabLayout.java" Code: Java  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i public String GetTitle(int _position) {      return GetText(_position);  }   Thanks to All! ---------------------------------------------------------------------- c4p · 2025-02-02 08:24 Thank you @jmpessoa ---------------------------------------------------------------------- Narciso · 2025-02-02 17:10 to solve the matter must i reinstall all lamw or only rewite the file jstablayout.java? ---------------------------------------------------------------------- jmpessoa · 2025-02-02 17:17 Yes, you can simply add the missing method Code: Java  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i public String GetTitle(int _position) {      return GetText(_position);}  to "jstablayout.java"  in LAMW folder "....\android_wizard\smartdesigner\java" ---------------------------------------------------------------------- Narciso · 2025-02-02 22:28 tank you, should be a good idea add a function like this: tablayout.indexof(tablename)