Ok, my code is being weird and i don't why... (no scoffing for me using VB i chose this language for this project because of the ease to connect to a MS Access DB)
I've got a Dynamic control,
Code:Dim eventlabels As Label()now for whatever reason the .font isn't changing when the form displays... i pulled that line straight out of the default define (created by the compiler.. ok well IDE) for another label i have on the form... anyone have a clue as to why this wouldn't change the font property... In addition the .location doesn't change no matter what i set the new draw point to.Code:eventlabels = New Label(currentevents.Length - 1) {} 'define array size For x As Integer = 0 To eventlabels.Length - 2 eventlabels(x) = New Label Select Case currentevents(x).getEventDate Case datearray(0) gpbSun.Controls.Add(eventlabels(x)) 'adding labels to Case datearray(1) 'correct groupbox gpbMon.Controls.Add(eventlabels(x)) Case datearray(2) gpbTues.Controls.Add(eventlabels(x)) Case datearray(3) gpbWed.Controls.Add(eventlabels(x)) Case datearray(4) gpbThur.Controls.Add(eventlabels(x)) Case datearray(5) gpbFri.Controls.Add(eventlabels(x)) Case datearray(6) gpbSat.Controls.Add(eventlabels(x)) End Select With eventlabels(x) 'setting properities of labels .Size = New System.Drawing.Size(12, 12) .Text = currentevents(x).getEvent .Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) .AutoSize = True .Hide() .Enabled = True .Visible = True .Location = New System.Drawing.Point(10, 15000) .Show() End With AddHandler eventlabels(x).Click, AddressOf EventLabelHandler Next
help is much appreciated![]()




Reply With Quote