G
grompl
..NET CF 1.0 SP3, PocketPC 4.20.0.14053, Device: Intermec CN2B
I have a panel with a tab control with two tab pages and a button named
'ok'. If the selected tab page changes I'm adding that button to the
selected tab page:
Private Sub tabControl_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles tabControl.SelectedIndexChanged
Me.tabControl.TabPages(Me.tabControl.SelectedIndex).Controls.Add(Me.ok)
End Sub
I think this code should automatically remove the button from the
deselected tab and add it to the selected tab.
My problem is that the button is not visible after changing the tab
page. but if I click at the position where the button should be, the
button is clicked. In my application the button is located at the
bottom left corner of the panel. so, the position of the button is
covered by the menu, if I open it. after opening and closing the menu
the button is suddenly visible. so I thought that the problem is that
the button was not repainted. but adding Refresh() and Invalidate()
methods of the panel, tabcontrol, tabpage, button does not solve the
problem.
Any suggestions?
I have a panel with a tab control with two tab pages and a button named
'ok'. If the selected tab page changes I'm adding that button to the
selected tab page:
Private Sub tabControl_SelectedIndexChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles tabControl.SelectedIndexChanged
Me.tabControl.TabPages(Me.tabControl.SelectedIndex).Controls.Add(Me.ok)
End Sub
I think this code should automatically remove the button from the
deselected tab and add it to the selected tab.
My problem is that the button is not visible after changing the tab
page. but if I click at the position where the button should be, the
button is clicked. In my application the button is located at the
bottom left corner of the panel. so, the position of the button is
covered by the menu, if I open it. after opening and closing the menu
the button is suddenly visible. so I thought that the problem is that
the button was not repainted. but adding Refresh() and Invalidate()
methods of the panel, tabcontrol, tabpage, button does not solve the
problem.
Any suggestions?