Results 1 to 18 of 18

Thread: Need help to create this control (some sort of 'node' cell)

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    59

    Need help to create this control (some sort of 'node' cell)

    Hello everyone!

    I am not new to this forum, but I have lost my old account ...

    So:
    Greetings to all again !!

    My current problem is the following:

    I'm trying to create some sort of control that I can add to a project, rather than building it on Form directly.



    What I would like to do is what is described in the attached drawing



    --- --- ---

    Obviously, I have to implement functions, which allow me to load and / or save the dates I enter in the fields!
    (But that's something I can see later ...
    For now I'd be interested in being able to create Control first!)


    Can anyone weapons any indication !?

    Thank you
    Attached Images Attached Images  

  2. #2
    Frenzied Member
    Join Date
    Apr 2012
    Posts
    1,191

    Re: Need help to create this control (some sort of 'node' cell)

    You could take a look at the UserControl that I created for the add-in below. It would do everything you want to do, I think, with a few modifications....

    https://www.vbforums.com/showthread....o-sub-classing!
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    59

    Re: Need help to create this control (some sort of 'node' cell)

    First of all: thanks for the reply!

    This dll of yours is interesting; I want to scrutinize it a bit ...

    But I didn't understand: is it needed for the design phase?

    How can it help me achieve my 'control'?

  4. #4
    Frenzied Member
    Join Date
    Apr 2012
    Posts
    1,191

    Re: Need help to create this control (some sort of 'node' cell)

    The dll is the add-in itself. The only thing you need from that project, is the UserControl, which can be used in any project. The only changes you should need to make are to make the 'sub-items' appear on their own lines (as it stands, multiple sub-items can appear on a single line, but that would be very easy to change).

    Have a play, and ask if you have any questions. Or, you could just use a FlexGrid to do the same thing (by hiding and unhiding the sub-item rows). You may find that simpler, depending on how you intend to use your control.
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  5. #5
    Frenzied Member
    Join Date
    Apr 2012
    Posts
    1,191

    Re: Need help to create this control (some sort of 'node' cell)

    If you wait a bit, I'll post a modified version into the CodeBank, with a demo of how to use it...
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  6. #6

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    59

    Re: Need help to create this control (some sort of 'node' cell)

    Ok! All right thank you.

    In the meantime I try to do it some other way ...
    Better and better to have more possibilities!

    (In fact, I have already made a step: it is easy for me to create a function that can create multiple cells, adding them with the program started, but I have / should create a routine that takes into account the indentation of the sub-cells ...)

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Posts
    22,956

    Re: Need help to create this control (some sort of 'node' cell)

    We already have a control that does this sort of thing:

    Name:  sshot.png
Views: 206
Size:  4.4 KB
    Attached Files Attached Files

  8. #8

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    59

    Re: Need help to create this control (some sort of 'node' cell)

    Hi Dilettante.


    So: thanks for the example.

    However, this control is not very good for me, since closing the '+', everything is hidden, while I need the staff to remain ...

    I am attaching another example.





    (Even without spaces between the Textboxes, that would be fine, but that's just a graphics issue!)
    Attached Images Attached Images  

  9. #9
    Hyperactive Member Episcopal's Avatar
    Join Date
    Mar 2019
    Location
    Brazil
    Posts
    301

    Re: Need help to create this control (some sort of 'node' cell)

    Quote Originally Posted by ColinE66 View Post
    You could take a look at the UserControl that I created for the add-in below. It would do everything you want to do, I think, with a few modifications....

    https://www.vbforums.com/showthread....o-sub-classing!
    A holy control ... thanks ColinE66

  10. #10

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    59

    Re: Need help to create this control (some sort of 'node' cell)

    Hi ColinE66
    (and hello everyone!).

    So ...

    I went on my way. I created a little in my own way, what I needed.

    However...
    I continue to remain curious about your control (which you suggested).
    I can't understand how it could have served me.

    And if you wanted to explain it to me, I'd love to.

    Greeting!

  11. #11
    Frenzied Member
    Join Date
    Apr 2012
    Posts
    1,191

    Re: Need help to create this control (some sort of 'node' cell)

    Perhaps it was never the best option for what you had in mind; when you first created this thread, there wasn't much information about what you were ultimately trying to achieve. For example, my control has methods built-in for moving sub-items around, and that might have been something you were interested in....

    So, basically, I only suggested it as an option, given that you appeared to want create something 'bespoke'. I also mentioned the FlexGrid (in case you weren't going so much for 'exotic' behaviour).
    If you don't know where you're going, any road will take you there...

    My VB6 love-children: Vee-Hive and Vee-Launcher

  12. #12
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    2,709

    Re: Need help to create this control (some sort of 'node' cell)

    So what he basically wants, is a ListView in report-style married with a TreeView.
    The (multicolumn) TreeView would be the "Parent", while the (multicolumn) ListView would be the "Detail"
    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  13. #13

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    59

    Re: Need help to create this control (some sort of 'node' cell)

    So, ColinE66, thanks for the clarification!



    (For Zvoni)
    Zvoni, since you have described in some 'detail' what I need ...
    It is not by chance that you know, if such a control already exists !?
    (I mean in a single 'block', as now I see if your suggestion can be applied)

    (By now, as a matter of principle, I have to complete what I am doing; but sometimes, having some alternatives, it can be useful)

  14. #14
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    2,709

    Re: Need help to create this control (some sort of 'node' cell)

    For vb6? Not that i know of.
    I know that it's available in other Languages (in my Case Lazarus/FreePascal), but for vb6.... *shrug*
    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  15. #15

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    59

    Re: Need help to create this control (some sort of 'node' cell)

    Alright then.
    Forget it!!

    It means that I will have to create it myself, first !!!



    Thanks anyway!

  16. #16
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,683

    Re: Need help to create this control (some sort of 'node' cell)

    Quote Originally Posted by ProgyReloaded View Post
    It means that I will have to create it myself, first !!!
    What you want, is IMO a "TreeList-Control".

    And this type of control is usually implemented in a "virtual fashion"
    (throwing OwnerDraw-Events for your Items, in which you then draw from an ADO-Recordset or another external DataSource).

    Here is a Control, which operates in such a virtual mode:
    https://www.vbforums.com/showthread....TreeList-Demo)

    HTH

    Olaf

  17. #17

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    59

    Re: Need help to create this control (some sort of 'node' cell)

    Hi Schmidt!

    Sorry if I answer you only now, but in reality, it was just by chance that I went back, as, as you can see from the post, for me it was closed, having moved on in another way.

    But your solution was interesting, even if it didn't suit my use well, as the desired graphic effect (based on the text) was not optimal.

    But anyway, Thanks !!


    Anyway, since we're at it, I ask you: could you help me with this other thing !?

    (I left another post, in which I explain everything, soon I will add the link)

  18. #18

    Thread Starter
    Member
    Join Date
    Mar 2021
    Posts
    59

    Re: Need help to create this control (some sort of 'node' cell)

    This is the link at my other question...

    https://www.vbforums.com/showthread....blem-very-easy!!!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width