Hi David,

    I sent you some of the code in my Uninstall program. It uses several levels 
and could be more than those 2 plus a button to select in the second level.

    When reading that code I made ID values based on how many on the list, in 
other words if the first level has 1000 I made sure the id numbering would 
match it, then the next level down would have a power of 10 more than that or 
the reverse.

    The subroutine is getTree and it uses the names on the list to make the 
selection of levels. Study it and look in the getTree and the subroutines it 
calls to get children for that tree. 

    As I said, the ID is the most important thing and selections are based on 
those ID's and such. I just used numbers but you could used color categories 
inside that or for the ID.

    There are several other subroutines that are test routines and can be 
ignored. But once you read through it and the beginning of the mainprog 
callback that checks for tree selections you should be able to understand it. I 
included the declares as well.

    Happy hacking on my code.

        Sincerely
        Bruce

  Sent: Saturday, March 30, 2013 1:43 PM
  Subject: Re: Suggestion needed, is a Treeview the right thing?


  Well fact is, that the project is going to have more like 50 entries on the 
main level, and up to five sub-level on some of the entries. That is why, I 
don't think a load of checkboxes would do. It would not even fit into a screen. 
The total list, including all sub-lists, holds more than 300 entries.

  And, you are not just to decide Shirt, Pant or Socks. You will also choose 
the color, and if available the shade. So, you can choose only pants (with no 
color choice), and Shirt with the color green, and for socks, you can choose 
both black and Blue. Do you choose blue socks, there is the choices of Skyblue, 
Navy or Ocean blue. If you have the chance, please look at the short list I 
provided, and pay attention to the levelling of each entry, and you will see 
how they are connected with each other.

  I could have made a multi-selection list, but then the user will have to 
scroll through a ton of colors, for each piece of cloth. All of this, was the 
reason, why I thought of a treeview, as it would give the user a quick way of 
scrolling down to the cloth he wanted, then expand that one, and check the 
colors he wanted. 

  But apparently I was not explaining this well enough. Thanks anyway for the 
ideas. They would have worked in a simpler project, but I have a feeling it 
would be hard to have to tab through several hundred checkboxes for putting 
together an outfit. :) 

  Regards,

    ----- Original Message ----- 
    From: Rod Hutton 
    To: [email protected] 
    Sent: Saturday, March 30, 2013 6:20 PM
    Subject: Re: Suggestion needed, is a Treeview the right thing?


    Hi David,

    Here’s a lazy man’s point of view:  why not just have 3 groups of 
checkboxes in one dialog; the first group (at the top of the dialog) would be 
“shirt”, the second (below the “shirt” group), would be “pants,” and the third 
group (below “pants”) would be “socks.”  So, all you would need to do is tab 
around and check/uncheck to your heart’s content. 

    Cheers,

    Rod 

    From: David 
    Sent: Saturday, March 30, 2013 10:01 AM
    To: [email protected] 
    Subject: Suggestion needed, is a Treeview the right thing?

    I am about to start out on a new project. But I want to do things the 
better way, first go. .)

    If I, in short terms, would describe the feature I am trying to figure how 
to, let me give this example.

    Imagine we have three main levels. Let's for the ease of the example, say 
they are:
        Shirt
        Pant
        Socks

    . Now imagine, we have subcategories of each, giving different colors, and 
maybe even subcategories from there, giving the shades. So, the whole 
structure, would look like this:

        Shirt
            Green
            White
            Blue
        pant
            green
            red
            black
        socks
            green
                light
                dark
            white
            blue
                sky
                ocean
                navy
            Black
            Yellow.


    My first idea, would be to put all of this into a treeview. Thing is, that 
I wanted to have the chance of "checking" the different entries. That is, a 
person should be able to put a check mark, at the Green, under both Shirt and 
Pant. Maybe even check both Green and and white, for the shirt, and green for 
the pant.

    I have never constructed a treeview, and I don't even know, if it is 
possible in a rather simple way - to accomplish what I here am attempting to 
do. Hence, my first question would be, is a treeview the right way to go? 
Secondly, is it even possible to do what I want? And thirdly, is there any 
tutorial, or scripting samples, that would address this kind of task. 
Preferably, something that does not contain thousand of lines, in a high-tech 
and fancy script. 

    Ok, I do understand, I would have to deal with dialogs, and treeviews or 
whatever, from an XML. Fine enough, but what would be suggested from some of 
you more experienced developers out there?

    Thanks alot for any feedback,

Reply via email to