Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Use, XML! It's human-readable!</p> <p>More seriously-</p> <p>It seems like you're trying to create some sort of configuration wizard, so I'd start by researching that. Regarding your particular solution, I generally advocate <em>very</em> strongly against the "layered panel" approach. I do so because I maintain apps written by people who found this approach, or the related "hidden tabs on a tab control" approach, to be a good idea. It's not, and maintainers will curse your name for years to come.</p> <p>That being said, what alternatives are there? Well, one alternative is what you've already dismissed because of its "flicker". I'd say that, in general, the flicker isn't that big of a deal for a quick and dirty application. It might be a good idea to make sure that your new window is called up before closing the old one, for example. (I'm assuming this is possible, I haven't developed on a mobile device.)</p> <p>Another possibility might be a less-evil version of your layered panels. Instead of throwing a half-dozen panels into one form, create a separate user control for each wizard page and then add/remove the user controls to a containing form. This can avoid your flicker and will prove to be much easier to maintain because each page is in a different control. This might also ease any subsequent "Back" button functionality and make your data structures more naturally defined because those user controls will be associated with a specific logical bit of data. It's still not ideal, but it's probably good enough for a one-off solution.</p> <p>A third technique, if you foresee <em>extensive</em> wizard modification as the product matures, might be to generalize the creation of your user controls by defining them in a more logical/declarative manner (e.g. via XML). If you dynamically generate sensible controls based on XML, then modifying the panels might be as easy as diving into your XML and doing something like:</p> <pre><code>&lt;Questions&gt; &lt;Question type="Text"&gt; &lt;!-- generate a textbox for the answer field --&gt; Favorite Color: &lt;/Question&gt; &lt;Question type="Number" range="0-255"&gt; &lt;!-- Maybe this is a spinner --&gt; The answer to life, the universe, and everything: &lt;/Question&gt; &lt;/Questions&gt; </code></pre> <p>That's just off the top of my head, and <strong><em>completely</em></strong> overkill for any one-off application, but it's a possibility.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload