[Gambas-user] Tabstrip - adding tabs with controls

Titan Rain 07.rain at ...626...
Wed Jun 29 14:55:03 CEST 2011


I'm trying to use a tabstrip to contain a textarea and other controls.
So far I have the following which checks if a tab exists and if it
doesn't it adds a new tab, and creates a textarea in that tab.
But the textarea is not visible until another tab is created. Any
suggestion as to why?

PUBLIC SUB Button1_Click()
DIM i AS Integer
DIM ta AS TextArea

  FOR i = 0 TO TabStrip1.Count - 1
    IF TabStrip1[i].Text = TextBox1.Text
      TabStrip1.Index = i
      RETURN
    ENDIF
  NEXT
 TabStrip1.Count += 1
 TabStrip1[TabStrip1.Count - 1].Text = TextBox1.Text
 ta = NEW TextArea(TabStrip1) AS "TextArea" & CStr(TabStrip1.Count - 1)
 TabStrip1.Index = TabStrip1.Count - 1
END




More information about the User mailing list