How to make a previous\next form || menu?

ล็อกแล้ว How to make a previous\next form || menu?

  • 2012年7月11日 20:10
     
      コードあり

    What i need to make is just like a setup, with previous and next buttons. I need to display a few texboxes, comboxes,labels and a datetimepicker.

    But i need some away to control what is displayed, by other words i need something like a position_marker, so i know what to display on previous.click and next.click.

    An example of what I need:

    step = 0
    
    txtbox1.visible = true
    label1.visible = true
    
    step = 1
    
    txtbox1.visible = False
    label1.visible = False
    txtbox2.visible = true
    label2.visible = true

    I tried to separate the controls by putting them in groupboxes. I start with groupbox1.visible = True, after I move to the next step i use this:

    groupbox1.visible = False
    groupbox2.visible = True
    But the second groupbox doesn't get displayed.

    Even so, that doesn't really mater since I find this Groupbox "method" a bit of a mess.

    Now I was thinking of creating an array for my textboxes and my other controls, but i really don't know.

    So, any ideas?

すべての返信

  • 2012年7月11日 21:06
     
     回答済み
    You can create a UserControl using panels. Put the panels in an array and you control the array index to bring specific panels to front or back when the buttons are clicked.
  • 2012年7月11日 21:17
     
     
    Thanks Stanav.

    Gave it a little test, and it's exactly what I needed.