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. Visual Basic
  4. Scroll controls in a TableLayoutPanel using code

Scroll controls in a TableLayoutPanel using code

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
6 Posts 4 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.
  • D Offline
    D Offline
    dilkonika
    wrote on last edited by
    #1

    Hello ! I have a TablelayoutPanel with 1 row and some columns . I have added some controls on it. The problem is that some controls are out of Maximum visible area of TableLayoutcontrol. To resolve this problem I have added 2 special buttons that should perform Previous and Next. Between them , are the controls that I need. Now how can I do that when I click the next button , to make hidden the first Control and to show anoher control before the Next Button. For example : < Control1 Control2 Control3 > The user press the > button < Control2 Control3 Control4 > Thank you !

    L D S 3 Replies Last reply
    0
    • D dilkonika

      Hello ! I have a TablelayoutPanel with 1 row and some columns . I have added some controls on it. The problem is that some controls are out of Maximum visible area of TableLayoutcontrol. To resolve this problem I have added 2 special buttons that should perform Previous and Next. Between them , are the controls that I need. Now how can I do that when I click the next button , to make hidden the first Control and to show anoher control before the Next Button. For example : < Control1 Control2 Control3 > The user press the > button < Control2 Control3 Control4 > Thank you !

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

      You need to reset the location properties of each control every time the left or right button is pressed. However, I would suggest that you would be better redesigning your form. Most users hate having to jump through hoops like this just to do their work.

      1 Reply Last reply
      0
      • D dilkonika

        Hello ! I have a TablelayoutPanel with 1 row and some columns . I have added some controls on it. The problem is that some controls are out of Maximum visible area of TableLayoutcontrol. To resolve this problem I have added 2 special buttons that should perform Previous and Next. Between them , are the controls that I need. Now how can I do that when I click the next button , to make hidden the first Control and to show anoher control before the Next Button. For example : < Control1 Control2 Control3 > The user press the > button < Control2 Control3 Control4 > Thank you !

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        The TableLayoutPanel isn't really a visible control. It's a kind of framework that add properties to the controls it "contains" and modifies the functionality of the layout properties of those controls. If it were me that had to implement some kind of side-scrolling, I'd put the TableLayout and controls on a Panel control the width required to accommodate all of the controls, then stick that in another Panel that is the width of the viewable area and set it's AutoScroll property to True. But, I wouldn't be doing something like this unless I absolutely had no other choice. It's a kludge design that makes your application a bit harder to use and visualize data.

        A guide to posting questions on CodeProject

        Click this: Asking questions is a skill. Seriously, do it.
        Dave Kreskowiak

        1 Reply Last reply
        0
        • D dilkonika

          Hello ! I have a TablelayoutPanel with 1 row and some columns . I have added some controls on it. The problem is that some controls are out of Maximum visible area of TableLayoutcontrol. To resolve this problem I have added 2 special buttons that should perform Previous and Next. Between them , are the controls that I need. Now how can I do that when I click the next button , to make hidden the first Control and to show anoher control before the Next Button. For example : < Control1 Control2 Control3 > The user press the > button < Control2 Control3 Control4 > Thank you !

          S Offline
          S Offline
          Sascha Lefevre
          wrote on last edited by
          #4

          Aren't Control1 .. Control_n_ the buttons to select the result pages 1 .. n for your DataGridView? In that case I would suggest not creating n buttons but just three (or how many you want to show at maximum) and change their display-text and click-"interpretation" dynamically. So after a click on next, Control1 will change its displayed text from 1 to 2 and when clicked would trigger page 2 to be shown instead of page 1, etc.

          D 1 Reply Last reply
          0
          • S Sascha Lefevre

            Aren't Control1 .. Control_n_ the buttons to select the result pages 1 .. n for your DataGridView? In that case I would suggest not creating n buttons but just three (or how many you want to show at maximum) and change their display-text and click-"interpretation" dynamically. So after a click on next, Control1 will change its displayed text from 1 to 2 and when clicked would trigger page 2 to be shown instead of page 1, etc.

            D Offline
            D Offline
            dilkonika
            wrote on last edited by
            #5

            sorry , but these are not buttons. this question is not related with my previous questions. These are different controls( Most of them are TextBox and Combobox )

            S 1 Reply Last reply
            0
            • D dilkonika

              sorry , but these are not buttons. this question is not related with my previous questions. These are different controls( Most of them are TextBox and Combobox )

              S Offline
              S Offline
              Sascha Lefevre
              wrote on last edited by
              #6

              Alright, nevermind then :) But I have to agree with Richard and Dave - I wouldn't recommend doing that. Wouldn't it be possible to just show all controls at once?

              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