sethindeed Posted March 1, 2003 Posted March 1, 2003 ... Here is my code : For Each ctl in GroupBox1.Controls If Not TypeOf ctl Is Label Then ctl.Text = OleReader (ctl.Name.ToString) End If Next All controls update themselves except for the DateTime picker. The reason is simple, it does not have a Text property, it uses the Value property instead. I can't directly refer to the DateTime Picker in the code (i.e OpenTime.Value = "0:00:00 AM" ) because the control is loaded from a class at runtime. Is there a way to assign to the ctl variable the datatime picker type of control, then cycle throught it. What was supposed to be a dynamic application turns out to be a complete headache. thx Quote What I don't know keeps me excited...
sethindeed Posted March 1, 2003 Author Posted March 1, 2003 Nevermind I solved my problem. ctl will accept the Text property for a datepicker even if it is not in its collection. One of .Net strong point, I have to admit ;) Quote What I don't know keeps me excited...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.