Show a Text Suffix in an InputListBox

Show a Text Suffix in an InputListBox

arkelec
Collaborator Collaborator
402 Views
2 Replies
Message 1 of 3

Show a Text Suffix in an InputListBox

arkelec
Collaborator
Collaborator

Is it possible to show the text (in green) as per the List Box shown below?  The data required by the wider iLogic, is the two digit text in black.  It's just not easy to remember what the code represents (there are a lot more entries in the full version).

 

Inventor InputListBox v2.png

 

I can add the whole line as one string, then only select the first two characters from the left in the main iLogic code, but  is there a better way?

0 Likes
403 Views
2 Replies
Replies (2)
Message 2 of 3

ckeveryga
Advocate
Advocate

I believe this is what you're looking for. 

0 Likes
Message 3 of 3

WCrihfield
Mentor
Mentor

How about this?

Dim oOptions As New List(Of String)
oOptions.Add("01   General")
oOptions.Add("02   Cable")
oOptions.Add("03   Cable Assy")
oOptions.Add("04   Cable Glanding")
Dim oChoice As String = InputListBox("Choose one.", oOptions, oOptions.Item(1), "OPTIONS")
If oChoice.Contains("01") Then
	MsgBox("You chose 'General'.", vbOKOnly, "CHOICE")
ElseIf oChoice.Contains("02") Then
	MsgBox("You chose 'Cable'.", vbOKOnly, "CHOICE")
ElseIf oChoice.Contains("03") Then
	MsgBox("You chose 'Cable Assy'.", vbOKOnly, "CHOICE")
ElseIf oChoice.Contains("04") Then
	MsgBox("You chose 'Cable Glanding'.", vbOKOnly, "CHOICE")
End If

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes