Results 1 to 6 of 6

Thread: Dynamic list and texboxes

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    The Netherlands
    Posts
    96

    Resolved Dynamic list and texboxes

    I need to find a nice way to create something like this:

    Component 1
    Component 1 - Part 1
    Component 1 - Part 2
    Component 1 - Part 3
    Component 1
    Component 2 - Part 1
    Component 2 - Part 2
    Component 2 - Part 3

    Every line contains 3 listboxes and 1 textbox.

    The number of parts is decided after a user inserts a value into a textbox. If he changes the number, the number of parts should be changed aswell.

    I have 16 components which is a fixed number, the number of parts can vary between 1 and 16.

    What would be the best way to do this?
    Last edited by Chrissie; Dec 15th, 2004 at 01:51 PM.

  2. #2
    Addicted Member
    Join Date
    Nov 2004
    Posts
    171

    Re: Dynamic list and texboxes

    Ok, IF, and that is a big if, I understand what you are talking about, assign 16 to a variable. In the textChanged event of the textboxes, make the text an integer (I don't remember exactly what this is in vb... maybe parseInt?) and subtract that number from your sixteen. Use error code to make sure that the variable does not get below zero. This may seem kinda sketchy, but I don't have time right now for a full explanation. By the time I get back here, if this doesn't help, I'm sure someone else can give you an example.
    Sherminator ~ I'll be back.

  3. #3
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192

    Re: Dynamic list and texboxes

    Here you have an example of what I think you want to do.

    This can be achieved using Control Arrays and I demonstrate how to do it in the attachment.

    Please tell us if this solves your problem, if it does then add a (Resolved) to the title of your thread or change the icon to the green checkmark (or both). Thank you.
    Attached Files Attached Files
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

  4. #4
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192

    Re: Dynamic list and texboxes

    I was reading again what you posted and I am not quite sure if what I attached before will do what you want.

    So here I attach another project. Maybe both are a part of what you are seeking for. I don't know, you would have to check.

    In this project I add I try to recreate what you say about the list in your post (When you click on the "Advanced..." button) But I must admit I didn't understand all what you wanted. If none of what I proposed is what you are after, please let us know.
    Attached Files Attached Files
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2002
    Location
    The Netherlands
    Posts
    96

    Re: Dynamic list and texboxes

    Okay thanks a lot!

    This is a much better way than I figured out myself. Especially the advanced mode that's very nice.

    I was thinking about generating textboxes and stuff. Which would leave me up with over 250 textboxes, which wouldn't be very clear for a user.

  6. #6
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192

    Re: Dynamic list and texboxes

    You are welcome
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

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