Outlook Mode - Determine Active Page

Topics related to the Krypton Navigator.

Moderators: Phil Wright, Chris Porter

Outlook Mode - Determine Active Page

Postby quimbo » Fri Nov 09, 2007 3:45 am

I have a Navigator in outloook mode with multiple pages. At the close of my main application how can i detect which of the pages is the active page? Assuming i persist this setting, how can i start the application with the saved page being the active page?


solved:

at form close:



Code: Select all
     IsoStoreSettingsHelper.Write("CallTracker.dat", "SelectedPage", Me.kryptonNavigatorMain.SelectedPage.Name)


at form load



Code: Select all
        Dim firstPage As String = IsoStoreSettingsHelper.Read(Of String, String)("CallTracker.dat", "SelectedPage")

   If Not firstPage Is Nothing Then
            Me.kryptonNavigatorMain.SelectedPage = Me.kryptonNavigatorMain.Pages(firstPage)
        End If

quimbo
 
Posts: 169
Joined: Sat Sep 08, 2007 3:38 am

Postby Anti » Fri Nov 09, 2007 8:05 am

So basically save the selectedIndex and reload it?

I'm not a vb user (c# :) )
Code: Select all
    Public index As Integer
    Private Sub Form1_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        'save index here
    End Sub

    Private Sub KryptonNavigator1_SelectedPageChanged(ByVal sender As 
                            System.Object, ByVal e As System.EventArgs) Handles    KryptonNavigator1.SelectedPageChanged
        index = KryptonNavigator1.SelectedIndex()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'load index here
        KryptonNavigator1.SelectedPage = KryptonNavigator1.Pages(index)
    End Sub
Anti
 
Posts: 20
Joined: Thu Mar 01, 2007 4:19 am
Location: Belgium


Return to Krypton Navigator

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron