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. showing a panel on a dialog

showing a panel on a dialog

Scheduled Pinned Locked Moved C#
questiondata-structureshelp
5 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.
  • N Offline
    N Offline
    NikoTanghe
    wrote on last edited by
    #1

    I want to do the following thing: I have a tabsheet with properties where a user can set the program option, configure some various data, ect... Some parts (a specific panel that is on a tab) must be showed in a separate dialog. In the application, there is a 'Edit' button. clicking on it brings up a modal dialog with the panel and a save button. This because the option screen has lots of tabpages. Jumping to the specific panel to let the user configure the option would be to messy. how would the user finds his way back to the page with the edit button and continue? OK, so far, so good. Bringing the panel in a dialog is no problem in the constructor of a 'edit'dialog, add the panel to the controls array. Troubles start when the edit dialog is closed. This will also close the panel on the option screen. (a dialog will automatically close his child controls) how can I prevent this? Perhaps a better solutions to do this? greetings, Niko

    K 1 Reply Last reply
    0
    • N NikoTanghe

      I want to do the following thing: I have a tabsheet with properties where a user can set the program option, configure some various data, ect... Some parts (a specific panel that is on a tab) must be showed in a separate dialog. In the application, there is a 'Edit' button. clicking on it brings up a modal dialog with the panel and a save button. This because the option screen has lots of tabpages. Jumping to the specific panel to let the user configure the option would be to messy. how would the user finds his way back to the page with the edit button and continue? OK, so far, so good. Bringing the panel in a dialog is no problem in the constructor of a 'edit'dialog, add the panel to the controls array. Troubles start when the edit dialog is closed. This will also close the panel on the option screen. (a dialog will automatically close his child controls) how can I prevent this? Perhaps a better solutions to do this? greetings, Niko

      K Offline
      K Offline
      Kurt _B
      wrote on last edited by
      #2

      Niko Do you need this panel in multiple places? If not why not create a options class that holds all your options and pass a reference to the class to your modal dialog. Set the options in the panel from the class and if the user clicks ok update your class. Hope this helps. Kurt

      N 1 Reply Last reply
      0
      • K Kurt _B

        Niko Do you need this panel in multiple places? If not why not create a options class that holds all your options and pass a reference to the class to your modal dialog. Set the options in the panel from the class and if the user clicks ok update your class. Hope this helps. Kurt

        N Offline
        N Offline
        NikoTanghe
        wrote on last edited by
        #3

        thanks Kurt, but the panel contains lots of databound controls. in the panel, the user can manage his customers, products, ... reading all this data in an option class would be inefficient. I also don't want to implement the same funtionality twice. The application would be hard to maintain if I do so. I guess I need to create a copy of the panel on the dialog. (cloning the object doesn't work on controls) greetings, Niko

        K 1 Reply Last reply
        0
        • N NikoTanghe

          thanks Kurt, but the panel contains lots of databound controls. in the panel, the user can manage his customers, products, ... reading all this data in an option class would be inefficient. I also don't want to implement the same funtionality twice. The application would be hard to maintain if I do so. I guess I need to create a copy of the panel on the dialog. (cloning the object doesn't work on controls) greetings, Niko

          K Offline
          K Offline
          Kurt _B
          wrote on last edited by
          #4

          You could always make the panel a control. Do you have a screen shot by chance?

          N 1 Reply Last reply
          0
          • K Kurt _B

            You could always make the panel a control. Do you have a screen shot by chance?

            N Offline
            N Offline
            NikoTanghe
            wrote on last edited by
            #5

            making a usercontrol of the panel would make sense, I'll try this one. There nothing much to see on the panel to edit a product: About 10 databound text boxes and 2 editable datagrids are on the panel Kurt, thanks for you advice.

            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