Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

...

 

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

What I don't know keeps me excited...
Posted

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 ;)

What I don't know keeps me excited...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...