[Gambas-user] Still jacking with tabstrips properties and adding tabs

Ron Onstenk ronstk at ...239...
Thu Aug 14 22:45:01 CEST 2008


On Thursday 14 August 2008, M0E Lnx wrote:
> Here is the code snipplet that I have where the tabs get added to the
> tabstrip (additional to the existing tabs)
> http://pastebin.com/m15deb6a5
> and this is the complete module (in case that doesn't make sense)
> http://vinstall-ng.googlecode.com/svn/branches/iVL/MdlLiloOsList.module
> 
Your code snip at pastebin looks good to me.

> The method I have now works, but I still dont understand why in the
> WITH statement if I increate the .count and try to set the index to
> .count -1 doesn't work..
> 
> If a tabstrip has 5 tabs, the last index on there will be 4
> do If I add one more, the count will increase to 6 and the total index
> will increase to 5
> I should be able to do .Count - 1 (should always be total tabs - 1).
> 
This is in my opinion also correct.

Why not is to answer by Benoit I think.

One question did you try the print .count and was the value correct ?


The only thing I do not understand is the line with 'idx = tabstrip1.count - 1'
Let asume we call this sub the first time and ther are no tabs.
Then count=0 so idx will be -1. 
Setting in the WITH section the .index=idx should fail because the index 
never can be negtive.

Sorry but I can't help you more then with the suggested code parts, 
As I understand it does work now but not in the expected logical way.

Ron 1st






More information about the User mailing list