Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The problem is the start is very easy and ends without traceable steps.
Prerequisites are a VBdotNet Form project through visual studio surface.
I could have a listbox with only a displaymember "list" or
a textfile that changes the content of a label.
Mainly with the propertyname backcolor or text. I cannot concider "points" that i cannot recognize. The most easy part is to have a textfile with the content of two words. Aword linebreak carriage return next line Asecondword.
VBFormListboxLabel

VB.NET
Imports System.IO
Public Class Form1
    ReadOnly GRUNDL As New Label
    ReadOnly CHANGES As New ListBox
    Public StringTheorie() As String = File.ReadAllLines("C:\GripInseln.txt")
    Public Sub New()
        ' Dieser Aufruf ist für den Designer erforderlich.
        InitializeComponent()
        With CHANGES
            .Location = New Point(350, 50)
            .Size = New Point(250, 250)
            .Font = New Font("Consolas", 28)
            .DataSource = StringTheorie
            .BackColor = Color.FromArgb(64, 206, 203)
        End With
        With GRUNDL
            .Location = New Point(50, 50)
            .Size = New Size(250, 250)
            .Font = New Font("Libre Baskerville", 28)
            .DataBindings.Add("Text", StringTheorie, "")
        End With
        ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
        Me.Controls.AddRange({GRUNDL, CHANGES})
    End Sub
End Class


Now i aim to have in the listboxcontrol a displaymember. To have
for the label output aword and asecondword two different listbox output
entries, like withthis withthat.
The more i searched the more complicated it got.

What I have tried:

I started to search for a solution with some articles
RemoveDuplicateRows
DataSet Konstruktoren
ListControl.DisplayMember Eigenschaft

and a question i have posted in the Q&A section of the microsoft documentations
I try to achive a label member rectangle output through a textfile databindings listbox.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900