Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. TabControl question

TabControl question

Scheduled Pinned Locked Moved C#
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nlowdon
    wrote on last edited by
    #1

    Evning All, Can anyone tell me if it's possible to fire an event (add components to a form) when you click on the tab of a 'TabControl' I've learned that with other components in the form you 'double click' on say.....a button and it automatically takes you generated code that you can add to. However, when designing the form you can't double click on an individual tab so i was wondering i there is such a feature. Regards Neil

    G L 2 Replies Last reply
    0
    • N nlowdon

      Evning All, Can anyone tell me if it's possible to fire an event (add components to a form) when you click on the tab of a 'TabControl' I've learned that with other components in the form you 'double click' on say.....a button and it automatically takes you generated code that you can add to. However, when designing the form you can't double click on an individual tab so i was wondering i there is such a feature. Regards Neil

      G Offline
      G Offline
      gantww
      wrote on last edited by
      #2

      There is probably a tab changed event or something. Another option may be to get the click event of the tab control and then figure out which tab was clicked.

      1 Reply Last reply
      0
      • N nlowdon

        Evning All, Can anyone tell me if it's possible to fire an event (add components to a form) when you click on the tab of a 'TabControl' I've learned that with other components in the form you 'double click' on say.....a button and it automatically takes you generated code that you can add to. However, when designing the form you can't double click on an individual tab so i was wondering i there is such a feature. Regards Neil

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        Hi, you want the TabIndexChanged event. It handles the entire TabControl, not individual pages, so if you need code specific for each page you might want to insert a switch statement there. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        Fixturized forever. :confused:


        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups