Results 1 to 5 of 5

Thread: Two ListBox - What I have to do to simplify procedure?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Location
    in Poland
    Posts
    390

    Two ListBox - What I have to do to simplify procedure?

    Hi All

    I have something like this (added files) - it fine work, but....

    How every can it see, in this code are a two different procedures (basModule) - every for other listbox. It does this code weak readable, strongly complex, slowly and outright non-professional. How can I wrote this statement for more listbox?
    I need help how I can correctly wrote such code, simplify it and make it that will considerably quickly. Please HELP ME in this. Maybe on example my code? Thanks in advance
    Attached Files Attached Files
    I know, I know, my English is bad, sorry .....

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Two ListBox - What I have to do to simplify procedure?

    Here's a sample that shows how to make the code more dynamical. It just shows the way you can do it. You'll have to implement it yourself
    Attached Files Attached Files

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Location
    in Poland
    Posts
    390

    Re: Two ListBox - What I have to do to simplify procedure?

    Thank you for reply. Unfortunately....You understood me probably wrong, Gavio. In this example it should be (this is necessary):
    first: setting of columns
    second: writing in five columns at the same time
    and this all across use one simple of code. So, prob my is like this: how I can to do it?
    I thought that suffice rebuild this code. My request about help for me still is a current.
    Sorry, Your example of code does not fulfil none of my expectations

    P. S. the construction of project exclude use ListView control

    I greet Tamgovb
    I know, I know, my English is bad, sorry .....

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Two ListBox - What I have to do to simplify procedure?

    Listboxs do not have columns.

    Why can't you use the ListView?

  5. #5
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Two ListBox - What I have to do to simplify procedure?

    Quote Originally Posted by Tamgovb View Post
    .......
    P. S. the construction of project exclude use ListView control

    I greet Tamgovb
    Quote Originally Posted by Hack View Post
    Listboxs do not have columns.

    Why can't you use the ListView?
    What Hack says is absolutely correct. However if you want to give that look to your listbox, you can try this....

    vb Code:
    1. Private Sub Form_Load()
    2.    List1.AddItem "Row1Column 1" & Chr(9) & "Row1Column 2" & Chr(9) _
    3.    & "Row1Column 3" & Chr(9) & "Row1Column 4" & Chr(9) & "Row1Column 5"
    4.    
    5.    List1.AddItem "Row2Column 1" & Chr(9) & "Row2Column 2" & Chr(9) _
    6.    & "Row2Column 3" & Chr(9) & "Row2Column 4" & Chr(9) & "Row2Column 5"
    7.    
    8.    List1.AddItem "Row3Column 1" & Chr(9) & "Row3Column 2" & Chr(9) _
    9.    & "Row3Column 3" & Chr(9) & "Row3Column 4" & Chr(9) & "Row3Column 5"
    10.    
    11.    List1.Refresh
    12. End Sub
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

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