• Q: Someone an idea ...

    By Ulrich Krause 2 decades ago

    of how to set the labels in tabbed tables programaticaly ?

    • Here is one possible Solution

      By Joerg Reck 2 decades ago

      Sub Initialize


      Dim session As New NotesSession<br/>
      Dim db As NotesDatabase<br/>
      Set db = session.CurrentDatabase<br/>
      Dim doc As NotesDocument<br/>
      Dim databaseDesign As databasedesign 'DatabaseDesign-Class from the sandbox!<br/>
      <br/>
      Set databasedesign = createDatabaseDesign(db)<br/>
      Set doc = databasedesign.getFormByName(&quot;Test&quot;) '&lt;- here go your form<br/>
      Dim rti As NotesRichTextItem<br/>
      Set rti = doc.GetFirstItem(&quot;$Body&quot;)<br/>
      Dim rtnav As NotesRichTextNavigator<br/>
      Set rtnav = rti.CreateNavigator<br/>
      If Not rtnav.FindFirstElement(RTELEM_TYPE_TABLE) Then<br/>
          Messagebox &quot;Body item does not contain a table,&quot;,, _<br/>
          &quot;Error&quot;<br/>
          Exit Sub<br/>
      End If<br/>
      Dim rtt As NotesRichTextTable<br/>
      Set rtt = rtnav.GetElement<br/>
      Dim labels() As String<br/>
      Redim labels(1 To rtt.RowCount)<br/>
      For i = 1 To rtt.RowCount<br/>
          labels(i) = &quot;Tab &quot; &amp; i<br/>
      Next<br/>
      rtt.RowLabels = labels<br/>
      Call doc.Save(True, True)<br/>
      

      End Sub



      I think it is a answer to your Question, but it doesn't target :-(



      Greetings JJR

      • Thank you

        By Ulrich Krause 2 decades ago

        yes, this works. But as a limitation, you cannot switch the "tab" language according to the user's choice.

        Imagine the chaos ;-)



        But one could set the row labels to the default language. better than nothing

        • Only a workaround ...

          By Matthias TMC 2 decades ago

          Ulrich,

          As far as I know is it - unfortunately - impossible to do that.

          But I've created a workaround, see the download link at www.atnotes.de:

          http://217.160.137.156/yabbse/index.php?topic=14798.0



          There I switch the tabs programmatically by using hotspots on fields to switch the tabs. These fields can be filled by a setup document easily.



          Matthias