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. Change TabControl ItemSize dynamically?

Change TabControl ItemSize dynamically?

Scheduled Pinned Locked Moved C#
helpquestion
2 Posts 2 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.
  • U Offline
    U Offline
    User 1701216
    wrote on last edited by
    #1

    Hi, I'm working with a application and I've added support for scaling window so it can fit different resolution. One control I'm having problem with is the TabControl. I've used the fixed style and set the ItemSize (had to do that to get the correct look with horizontal text). But now the control refuses to change it's ItemSize when I'm scaling the window. Anyone know of a way to change the ItemSize property dynamically on a tabcontrol? Regards /Mike

    C 1 Reply Last reply
    0
    • U User 1701216

      Hi, I'm working with a application and I've added support for scaling window so it can fit different resolution. One control I'm having problem with is the TabControl. I've used the fixed style and set the ItemSize (had to do that to get the correct look with horizontal text). But now the control refuses to change it's ItemSize when I'm scaling the window. Anyone know of a way to change the ItemSize property dynamically on a tabcontrol? Regards /Mike

      C Offline
      C Offline
      codeprojectin
      wrote on last edited by
      #2

      this.tabControl1.ItemSize = new Size(Convert.ToInt32(this.Width * 0.1), Convert.ToInt32(this.Height * 0.1)); (Just a random number to have this, The tabcontrol is in Fixed Size mode) and have used the above code in Resize event.

      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