Click to See Complete Forum and Search --> : Thanks for the help with the command button caption
Yonatan
Nov 17th, 1999, 12:03 AM
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: RZvika@netvision.net.il
ICQ: 19552879 (http://www.icq.com/19552879)
AIM: RYoni69
badgers
Nov 17th, 1999, 12:09 AM
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 :D
[This message has been edited by badgers (edited 11-17-1999).]
badgers
Nov 17th, 1999, 11:15 AM
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? :D
thank you for your time and have a good day
------------------
I am so skeptacle, I can hardly believe it!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.