Event associated to addTab

I all :-)

Is there any event associated to elements[tab_panel].addTab[frm] ?

Best regards. Roberto Blasco.

Hi Roberto. I think there is no event associated to that method. What are your needs?

Thanks jasanta.

All the forms I show in my solution are inside the same main form inside a tab panel. So I’m trying to build my own history object to browse the screens.

Maybe the only solution is to fill a history/user table each time the screen is changed.

Best regards. Roberto Blasco.

Using the onShow event of each form. When it be first show you can add it to your history.

That’s what I’m gonna do … add to my history table/array an item each time the screen is shown.

… request for servoy team. Maybe it would be interesting to add this event in futures releases :P

Hi Roberto,

You could use the onTabChange event on the main tabpanel to track any screen changes.
This would save you from putting code in every form to track all this.

Hope this helps.

Hi ROCLASI

Thanks for your answer :D , I tried it before posting and it doesn’t works for me. When the form is changed in the main screen, that’s the code I use

forms[frm].controller.loadRecords(id);
forms.main.elements.tab_main.removeAllTabs();
forms.main.elements.tab_main.addTab(forms[frm]);

The OnTabChange event isn’t triggered when adding forms.

Best regards. Roberto Blasco.

Hi Roberto,

So you are removing the tab(s) everytime you switch forms (tabs) ?
Well I guess you (would) do this in a single method as well so you could add the tracker in that place instead.

Hope this helps.

Thanks a lot for your answers jasanta, roclasi :smiley:

Best regards. Roberto Blasco.