Thanks... i found a way to fix this by declaring an additional integer variable and assigning it's value before the WITH statement.
goes like this for i = 0 to array.count - 1 idx = tabstrip1.count - 1 with tabstrip1 .count = .count + 1 .index = idx .text = "New Tab" end with On Tue, Aug 12, 2008 at 6:06 PM, Ron Onstenk <[EMAIL PROTECTED]> wrote: > On Tuesday 12 August 2008, M0E Lnx wrote: >> With tabstrip1 >> .count = .count + 1 ' this works... adds a new tab to the tabstrip >> .index = .count ' This is where the problem is, it keeps saying bad index >> End With >> > > > If you have 1 tab then count=1 and index=0 > > Adding a TAB with .count + 1 gives 2 TAB's. > tab1 index=0, tab2 index=1 so index is 0 based. > the line with the error shoul be .index=.count - 1 > hope this help > > Ron 1st > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user