"Add New Tab" Button

Topics related to the Krypton Ribbon.

Moderators: Phil Wright, Chris Porter

"Add New Tab" Button

Postby seamusjunior » Wed Feb 18, 2009 9:29 pm

How do I add a "Add New Tab" Button to the navigator. I have button outside of the navigator that does this and works but I would like it attached to the navigator If possible.
seamusjunior
 
Posts: 14
Joined: Tue Feb 17, 2009 3:25 am

Re: "Add New Tab" Button

Postby Chris Porter » Thu Feb 19, 2009 1:35 am

This will add a new page when Button1 is clicked:
Code: Select all
Private Sub Button1_Click(ByVal sender as System.Object, ByVal e as System.EventArgs) Handles Button1.Click
    Dim newPage as New KryptonPage()
    newPage.Name = "NameGoesHere"
    newPage.Text = "TabTextGoesHere"
    KryptonNavigator1.Pages.Add(newPage)
End Sub

You should really take a look at the Krypton Examples that are provided when you install Krypton. The Navigator examples show page creation/deletion from user events just like the above code.
Chris Porter
 
Posts: 714
Joined: Fri Oct 12, 2007 5:39 am
Location: Oklahoma City, OK, US


Return to Krypton Ribbon

Who is online

Users browsing this forum: No registered users and 0 guests