Results 1 to 3 of 3

Thread: Thanks for the help with the command button caption

  1. #1

    Thread Starter
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892

    Post

    You can have it so that every line of the ListBox shows three words and an ellipsis, and when you click it, the entire item is copied to a MultiLine TextBox.

    Example:

    The item is:

    This is an example of how to show
    a MultiLine item in one line
    of a ListBox


    On the ListBox it shows:

    This is an...

    When you click it, the entire text is displayed in a MultiLine TextBox.

    ------------------
    Yonatan
    Teenage Programmer
    E-Mail: [email protected]
    ICQ: 19552879
    AIM: RYoni69

  2. #2
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    Yonatan
    I don't understand how to make that happen in code. Can you give me some hints:
    here is my code:
    Private Sub Form_Load()
    Dim temp As String
    Dim section(300) As String
    Dim i, j, newfile As Integer
    newfile = FreeFile
    Open "c:\temp\9999edcs.txt" For Input As newfile
    While Not EOF(newfile)
    Line Input #newfile, temp
    If InStr(temp, "<") Then
    List1.AddItem (section(i))
    i = i + 1
    Else:
    section(i) = section(i) & temp
    End If
    Wend
    Close newfile
    End Sub

    here is a little of the text file
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    16000 ELECTRICAL SPECIFICATIONS
    >010<
    DEFINITIONS
    BUILDER means Marshall Erdman & Associates.
    EC means Electrical Contractor.
    FAC means Fire Alarm Contractor.
    TC means Telephone Contractor.
    CC means Temperature Controls Contractor.
    FURNISH means to purchase, deliver to job site, and unload from truck at job site.
    INSTALL means to mount in place and make all necessary connections as specified on plans and
    shop drawings.
    PROVIDE means to FURNISH and INSTALL.
    SWITCHGEAR includes all switchboards, motor control centers, panelboards, circuit breakers,
    fusible and non-fusible disconnects, fuses, transformers, contactors, starters, etc.
    SWITCHGEAR SUPPLIER means either the BUILDER or the EC, as determined by the Project
    Manager, based on a separate switchgear bid by the EC.
    >020<
    GENERAL
    >025<

    the >***< is the delimiter
    thank you for your time and have a good day


    [This message has been edited by badgers (edited 11-17-1999).]

  3. #3
    Hyperactive Member badgers's Avatar
    Join Date
    Sep 1999
    Location
    Madison, WI USA
    Posts
    444

    Post

    Thank you for your help. Some of the suggestions gave me a different idea. I want to try to use a list box. Can a listbox have items that take up several lines?
    Here is what I am trying to do:
    I have a standard document that has 50 sections. I want a user interface that allows someone to select and unselect sections for use in a final document. The target format is an ASCII text file so that it can be brought into an AutoCAD drawing.
    A person needs to read the sections so that they can determine if it is needed or not. The begining of a section does not help because the beginings are not always unique. There is a lot of lawyer verbage at the begining of each section which is the same in several sections.
    The list box would be great if it could have several lines.
    Any ideas?
    thank you for your time and have a good day

    ------------------
    I am so skeptacle, I can hardly believe it!

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