Results 1 to 2 of 2

Thread: Need help badly...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Posts
    235

    Need help badly...

    I got this GUI

    Time Status
    0900 Available
    1300 Available
    1700 Available

    The time is in labels and the status is in linklabel...

    how do i when I click on the Available linklabel, besides the 0900...it should be able to return me the text 0900 or when I click the Available linklabel besides the 1300, it should return me the text 1300...

    i cant use .tag() property as it is not inside compact framework...how should go about doing it...

    This is how i create those labels and linklabels dynamically..

    Dim x As Integer = 30
    Dim y As Integer = 14
    Dim a As Integer = 80
    Dim b As Integer = 14
    Dim i As Integer

    For i = CInt(start) To CInt(endt) Step CInt(inc)
    Dim newLinkLabel(i) As OpenNETCF.Windows.Forms.LinkLabel
    Dim newLabel(i) As Windows.Forms.Label
    newLinkLabel(i) = New OpenNETCF.Windows.Forms.LinkLabel
    newLabel(i) = New Windows.Forms.Label
    With newLinkLabel(i)
    .Location = New Point(a, b)
    .Visible = True
    .Size = New Size(40, 20)
    .Show()
    .Text = "Book"
    .Enabled = True

    AddHandler newLinkLabel(i).Click, AddressOf newlinklabel_click
    End With
    Dim flag As Integer
    With newLabel(i)
    .Location = New Point(x, y)
    .Visible = True

    If i = start Then
    .Text = start
    Else
    .Text = CStr(i)
    End If

    Dim counter As Integer = 0
    For counter = 0 To time.Length - 1
    If (time(counter) = newLabel(i).Text) Then
    newLinkLabel(i).Text = "Booked"
    newLinkLabel(i).Enabled = False
    End If

    Next

    End With
    GroupBox1.Controls.Add(newLinkLabel(i))
    GroupBox1.Controls.Add(newLabel(i))
    'MsgBox(newLabel(1).Text)
    y = y + 17
    b = b + 17
    Next
    End Function

    Sub newlinklabel_click(ByVal sender As Object, ByVal e As EventArgs)
    End Sub

    help will be greatly appreciated...

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    No offense, but if you format your code I promise to help. Sorry, but I get a headache even looking at that.

    Mike

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