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. inherited forms resizing issue

inherited forms resizing issue

Scheduled Pinned Locked Moved C#
helpvisual-studiodesign
4 Posts 1 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    ive got an inherited form base class (BannerDialog) that has a banner on top and buttons on the bottom. the banner and buttons are anchored to the form using the ide'd design window. my problem is that on the inherited form (MyDialog : BannerDialog) the banner and buttons dont move when MyDialog resizes.

    L 1 Reply Last reply
    0
    • L Lost User

      ive got an inherited form base class (BannerDialog) that has a banner on top and buttons on the bottom. the banner and buttons are anchored to the form using the ide'd design window. my problem is that on the inherited form (MyDialog : BannerDialog) the banner and buttons dont move when MyDialog resizes.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Did you call base.OnResize() ? Jerzy

      L 1 Reply Last reply
      0
      • L Lost User

        Did you call base.OnResize() ? Jerzy

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        im not certain what you mean. i currently do not call base.OnResize(). If i do, do i override BaseClass.Resize()? and if so, how do i resize the base class's window size? where do i get the dimentions? *** added *** if i delete the inherited form's "this.ClientSize = new ..." in the Initialize component, and do nothing else, it seems to work. the form snaps to the inherited window's size and anchors properly. but i dont understand why.

        L 1 Reply Last reply
        0
        • L Lost User

          im not certain what you mean. i currently do not call base.OnResize(). If i do, do i override BaseClass.Resize()? and if so, how do i resize the base class's window size? where do i get the dimentions? *** added *** if i delete the inherited form's "this.ClientSize = new ..." in the Initialize component, and do nothing else, it seems to work. the form snaps to the inherited window's size and anchors properly. but i dont understand why.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          well, after toiling around the msdn i found a little blurb stating that controls on inherited forms that have anchor properties MUST be set to PROTECTED and not PRIVATE.. exposing controls is the absolute wrong way to write inherited forms (im no architect, but im pretty sure that breaks the model). -- unless there's a way to block the user from directly accessing the PROTECTED control aside from setting it's anchor. so the solution..? in base.Resize() i simply made the layout recalculations myself. years of vb experience pays off.

          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