[Gambas-user] Tabstrip - adding tabs with controls

Benoît Minisini gambas at ...1...
Wed Jun 29 14:59:36 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
> 

1) The TextArea is put into the current tab, not necessarily the last one.

2) If you don't give a size to your TextArea, you won't see it.

Regards,

-- 
Benoît Minisini




More information about the User mailing list