PC Review


Reply
Thread Tools Rate Thread

compact framework tabcontrol problem

 
 
=?Utf-8?B?am1yaWVtYW4=?=
Guest
Posts: n/a
 
      3rd Mar 2004
Call me a newbie... hopefully this will be an easy answer for you experienced coders. I have a simple tabcontrol with 3 tab pages. my problem is that I use the "selected_Index_changed" event, when I select a tab at runtime the panel that I associate with each tab page will not be visible. The only panel that I can get to display is the initial one I created. Each additional one will not be visible no matter what I try. Here is some of my code. Is there something that I need to do besides changing the panel.Visible property to TRUE? and changing changing the prior panel to FALSE

Private Sub TabControlTimeTracking_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControlTimeTracking.SelectedIndexChange

Select Case TabControlTimeTracking.SelectedInde
'Selecting the Add Asset page
Case
MsgBox("ADD"
PanelVIEWWeeklyTT.Visible = Fals
PanelADDTodayTT.Visible = Fals
PanelADDTTCODES.Visible = Tru
Case
MsgBox("VIEW"
PanelVIEWWeeklyTT.Visible = Tru
PanelADDTodayTT.Visible = Fals
PanelADDTTCODES.Visible = Fals
'tells if the label on panel is visibl
MsgBox(Label5.Visible

Case
MsgBox("Add today"
PanelVIEWWeeklyTT.Visible = Fals
PanelADDTodayTT.Visible = Fals
PanelADDTTCODES.Visible = Tru
End Selec

End Sub
 
Reply With Quote
 
 
 
 
éric
Guest
Posts: n/a
 
      3rd Mar 2004
have you tried using Panel.TabPage.Add(myTabage);

éric

"jmrieman" <(E-Mail Removed)> wrote in message
news:AB266F88-61FE-4B6E-BD99-(E-Mail Removed)...
> Call me a newbie... hopefully this will be an easy answer for you

experienced coders. I have a simple tabcontrol with 3 tab pages. my problem
is that I use the "selected_Index_changed" event, when I select a tab at
runtime the panel that I associate with each tab page will not be visible.
The only panel that I can get to display is the initial one I created. Each
additional one will not be visible no matter what I try. Here is some of my
code. Is there something that I need to do besides changing the
panel.Visible property to TRUE? and changing changing the prior panel to
FALSE.
>
> Private Sub TabControlTimeTracking_SelectedIndexChanged(ByVal sender As

System.Object, ByVal e As System.EventArgs) Handles
TabControlTimeTracking.SelectedIndexChanged
>
> Select Case TabControlTimeTracking.SelectedIndex
> 'Selecting the Add Asset page
> Case 0
> MsgBox("ADD")
> PanelVIEWWeeklyTT.Visible = False
> PanelADDTodayTT.Visible = False
> PanelADDTTCODES.Visible = True
> Case 1
> MsgBox("VIEW")
> PanelVIEWWeeklyTT.Visible = True
> PanelADDTodayTT.Visible = False
> PanelADDTTCODES.Visible = False
> 'tells if the label on panel is visible
> MsgBox(Label5.Visible)
>
> Case 2
> MsgBox("Add today")
> PanelVIEWWeeklyTT.Visible = False
> PanelADDTodayTT.Visible = False
> PanelADDTTCODES.Visible = True
> End Select
>
> End Sub



 
Reply With Quote
 
éric
Guest
Posts: n/a
 
      3rd Mar 2004
sorry

misread....

Try to add or remove the panel from the tabpage using TabPage.Controls.Add
or .Remove

"jmrieman" <(E-Mail Removed)> wrote in message
news:AB266F88-61FE-4B6E-BD99-(E-Mail Removed)...
> Call me a newbie... hopefully this will be an easy answer for you

experienced coders. I have a simple tabcontrol with 3 tab pages. my problem
is that I use the "selected_Index_changed" event, when I select a tab at
runtime the panel that I associate with each tab page will not be visible.
The only panel that I can get to display is the initial one I created. Each
additional one will not be visible no matter what I try. Here is some of my
code. Is there something that I need to do besides changing the
panel.Visible property to TRUE? and changing changing the prior panel to
FALSE.
>
> Private Sub TabControlTimeTracking_SelectedIndexChanged(ByVal sender As

System.Object, ByVal e As System.EventArgs) Handles
TabControlTimeTracking.SelectedIndexChanged
>
> Select Case TabControlTimeTracking.SelectedIndex
> 'Selecting the Add Asset page
> Case 0
> MsgBox("ADD")
> PanelVIEWWeeklyTT.Visible = False
> PanelADDTodayTT.Visible = False
> PanelADDTTCODES.Visible = True
> Case 1
> MsgBox("VIEW")
> PanelVIEWWeeklyTT.Visible = True
> PanelADDTodayTT.Visible = False
> PanelADDTTCODES.Visible = False
> 'tells if the label on panel is visible
> MsgBox(Label5.Visible)
>
> Case 2
> MsgBox("Add today")
> PanelVIEWWeeklyTT.Visible = False
> PanelADDTodayTT.Visible = False
> PanelADDTTCODES.Visible = True
> End Select
>
> End Sub



 
Reply With Quote
 
Serg Kuryata [MS]
Guest
Posts: n/a
 
      3rd Mar 2004
Could you please tell which control parents each panel? Please make sure
that panels are parented by the corresponding tabpages.

Thank you,
Sergiy.

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Thread-Topic: compact framework tabcontrol problem
| thread-index: AcQBJeRuDX8vkSqxTnGPEUqFFdDR9w==
| X-Tomcat-NG:
microsoft.public.dotnet.framework.compactframework,microsoft.public.dotnet.f
ramework.windowsforms.controls
| From: "=?Utf-8?B?am1yaWVtYW4=?=" <(E-Mail Removed)>
| Subject: compact framework tabcontrol problem
| Date: Wed, 3 Mar 2004 05:46:13 -0800
| Lines: 27
| Message-ID: <AB266F88-61FE-4B6E-BD99-(E-Mail Removed)>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups:
microsoft.public.dotnet.framework.compactframework,microsoft.public.dotnet.f
ramework.windowsforms.controls
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.windowsforms.controls:14774
microsoft.public.dotnet.framework.compactframework:47526
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Call me a newbie... hopefully this will be an easy answer for you
experienced coders. I have a simple tabcontrol with 3 tab pages. my problem
is that I use the "selected_Index_changed" event, when I select a tab at
runtime the panel that I associate with each tab page will not be visible.
The only panel that I can get to display is the initial one I created. Each
additional one will not be visible no matter what I try. Here is some of my
code. Is there something that I need to do besides changing the
panel.Visible property to TRUE? and changing changing the prior panel to
FALSE.

Private Sub TabControlTimeTracking_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
TabControlTimeTracking.SelectedIndexChanged

Select Case TabControlTimeTracking.SelectedIndex
'Selecting the Add Asset page
Case 0
MsgBox("ADD")
PanelVIEWWeeklyTT.Visible = False
PanelADDTodayTT.Visible = False
PanelADDTTCODES.Visible = True
Case 1
MsgBox("VIEW")
PanelVIEWWeeklyTT.Visible = True
PanelADDTodayTT.Visible = False
PanelADDTTCODES.Visible = False
'tells if the label on panel is visible
MsgBox(Label5.Visible)

Case 2
MsgBox("Add today")
PanelVIEWWeeklyTT.Visible = False
PanelADDTodayTT.Visible = False
PanelADDTTCODES.Visible = True
End Select

End Sub
|

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TabControl about to switch event in the Compact Framework =?Utf-8?B?UEhJSk8gTUFUSEVXIFBISUxJUA==?= Microsoft Dot NET Compact Framework 1 30th Sep 2006 06:43 PM
Problems Compact Framework TabControl. Alamo Microsoft Dot NET Compact Framework 1 9th Jun 2005 02:13 PM
Tabcontrol for pocket pc - .NET Compact Framework Claudio Menezes Microsoft Dot NET Compact Framework 4 24th Jul 2004 08:35 PM
TabControl about to switch event in the Compact Framework Bob Trabucco Microsoft VB .NET 2 21st Aug 2003 09:11 PM
TabControl about to switch event in the Compact Framework Bob Trabucco Microsoft Dot NET Framework 0 21st Aug 2003 07:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:06 AM.