Results 1 to 5 of 5

Thread: [2005] How to use tabcontrol???

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    58

    [2005] How to use tabcontrol???

    I m using the TabControl to list the items. If i click on one of the tab pages on the tabcontrol , i want the information on that particular tab pages to be retrieve from the database and display it on the on the tabcontrol itself. What are the codes to achieve this??

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2005] How to use tabcontrol???

    Each TabPage is like a Panel, on which you can place whatever controls you like. When you click on one of the tabs on the control the corresponding TabPage is displayed, thus displaying the controls you put on that page and only those controls. You don't have to do anything more than that to get the display to change. If you want to do something when the user clicks a tab, like retrieve data, then you should handle the SelectedIndexChanged event of the TabControl. You can then use the SelectedIndex or SelectedTab property to determine which TabPage is selected and then do whatever is required.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    58

    Re: [2005] How to use tabcontrol???

    i dun understand. i cant seem to find the selectedIndex or SelectedTab Propery when i click on the tab pages. so, where should i put the codes so that i can retrieve the info that i want when i click on the tab pages on the tabcontrol?

  4. #4

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    58

    Re: [2005] How to use tabcontrol???

    somebody help!!!! i need urgent reply

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2006
    Posts
    58

    Re: [2005] How to use tabcontrol???

    how do u retrieve the data when u click one of the tab pages in the tabcontrol??? what are the codes to achieve that????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width