A label property new rectangle, how do i change new rectangle to a list of, through databindings?

zZukerkucolor

New member
Joined
Nov 9, 2022
Messages
1
Programming Experience
3-5
Dim StringTheorie() As String = File.ReadAllLines("C:\GripInseln.txt")


While solutions with controls are posible

preparing controls for a use with file content

is for me not a default issue.


Reading the documentations online and offline i chose to make my own, for example colornames.


My contributions to Q&A or stackoverflow are not typed in english because i speak english but because i am a serious listener.


I do not know the next approachable step to use a label with invalidating a rectangle through lisbox entries.


With a class


Public Class MyLabel

Inherits Label

Public squaresnippet As Rectangle

Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)

If squaresnippet <> Nothing Then

e.Graphics.FillRectangle(Brushes.Red, squaresnippet)

End If

End Sub

End Class


i can add a label property.

In my form i used a method with the content


With BorderRectangleChanged

.Location = New Point(50, 50)

.Size = New Size(250, 250)

.BackColor = Color.Gold

.squaresnippet = New Rectangle(50, 50, 50, 50)

End With


while


ReadOnly BorderRectangleChanged As New MyLabel


was the class form1 instance. My first question is, is it possible to use a textfile list of with databindings or do i have also to implement an interface for my approach?
 

Latest posts

Back
Top