A
acleon
Hello group, sorry for my english
.
I want to implement a tab manager like Web browsers (IE or firefox),
which can open pages on each tab, in my case I want to open different
forms, one in each tab, but I want to created and eliminate at
runtime, apparently add or remove tabs in a TabControl is available
only in Design view, so I thought "simulate" these functions, to
explain it better it first give you an idea of my controls and its
components:
1- one TabControl tbcFichas with n tabs (10 in my case)
2-Each sheet has two necessary controls, a control button
"btnCloseTab" and a subform "sbfSubformulario"
The idea to simulate the function "CloseTab" is to change the
visibility and positioning of the tabs as follows:
Clicking on the button btnCloseTab the tab will be moved to the final
position and then change the Visible property to False.
Private Sub btnCerrarFicha _Click ()
Me.tbcFichas.Pages (Me.tbcFichas.Value). PageIndex = 9 'Change
the position of the tab
Me. TbcFichas.Pages (9). Visible = False 'invisible
End Sub
The problem is that by making it invisible (Me. tbcFichas.Pages (9).
Visible = False) skips the 2165 error "Unable to hide a control that
have focus" you can give me some idea of how to fix this? Or another
idea alternative to simulate this effect
Thanks
I want to implement a tab manager like Web browsers (IE or firefox),
which can open pages on each tab, in my case I want to open different
forms, one in each tab, but I want to created and eliminate at
runtime, apparently add or remove tabs in a TabControl is available
only in Design view, so I thought "simulate" these functions, to
explain it better it first give you an idea of my controls and its
components:
1- one TabControl tbcFichas with n tabs (10 in my case)
2-Each sheet has two necessary controls, a control button
"btnCloseTab" and a subform "sbfSubformulario"
The idea to simulate the function "CloseTab" is to change the
visibility and positioning of the tabs as follows:
Clicking on the button btnCloseTab the tab will be moved to the final
position and then change the Visible property to False.
Private Sub btnCerrarFicha _Click ()
Me.tbcFichas.Pages (Me.tbcFichas.Value). PageIndex = 9 'Change
the position of the tab
Me. TbcFichas.Pages (9). Visible = False 'invisible
End Sub
The problem is that by making it invisible (Me. tbcFichas.Pages (9).
Visible = False) skips the 2165 error "Unable to hide a control that
have focus" you can give me some idea of how to fix this? Or another
idea alternative to simulate this effect
Thanks