Welcome Guest Search | Active Topics | Members | Log In | Register

RE: TabControl and adding dynamic controls Options · View
Linda Liu[MSFT]
Posted: Monday, March 31, 2008 3:20:10 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 31/03/2008 03:20:10
Date: Mon, 31 Mar 2008 03:20:10 GMT

Hi Douglas,

Thank you for your reply!

> Odd, I wsn't notified you had posted.

Please make sure you have followed the instructions in the following
document to get notified when your post has a reply in the newsgroup:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

> I just don't know how to update the checkbox in the collection. is there
a better way to just index into the collection used an
...Item("myCheckBoxName") or something?

You can use the index or name of the control to get it from the collection.
For example:

Dim pl As New Panel
Dim txtbox As New TextBox
txtbox.Name = "mytextbox"
txtbox.Text = "this is my textbox"
pl.Controls.Add(txtbox)
'use the index of the control to get it from the collection
Dim ctrl As TextBox = CType(pl.Controls(0), TextBox)
'or use the name of the control
'Dim ctrl As TextBox = CType(pl.Controls("mytextbox"), TextBox)

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.


Linda Liu[MSFT]
Posted: Tuesday, April 01, 2008 8:39:26 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 01/04/2008 08:39:26
Date: Tue, 01 Apr 2008 08:39:26 GMT

Hi Douglas,

Thank you for your reply!

> I think I need addressibility from the
TabControl.TabPages("myTab").myPanel.myCheckBox.

No, we can only access the child control from the Controls collection of
the parent control.

> So farmy attempts say control is readonly. Does it make sence that I
clone the control, delete old one, then add new one with my changes?

What do you mean by "control is readonly"? You can delete a control from
the Controls collection of the parent control and add a new control into
the Controls collection without any problem.

If you have anything unclear, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.


Linda Liu[MSFT]
Posted: Wednesday, April 02, 2008 1:54:47 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 02/04/2008 01:54:47
Date: Wed, 02 Apr 2008 01:54:47 GMT

Hi Douglas,

Thank you for your prompt reply!

> Is there a way to just change a dynamic control without removing it and
addining it?

Yes. You can access the dynamically created control and then change its
property without removing it and adding it. You can always access the
dynamic created control from its parent control's Controls collection
either via the index or via its name.

> I need to be able to scroll my dynamically created panel.

You can set the AutoScroll property of the dynamically created panel to
true.

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.


Linda Liu[MSFT]
Posted: Friday, April 04, 2008 7:53:11 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 04/04/2008 07:53:11
Date: Fri, 04 Apr 2008 07:53:11 GMT

Hi Douglas,

Thank you for your reply!

When you set the TabPage to 50 rows height and the Panel to 52 rows height
and set the TabPage's AutoScroll property to false, the Panel itself is not
visible fully, i.e there're 2 rows height at the bottom of the Panel is not
visible.

Then you add controls of 80 rows height in the Panel. Even if you set the
Panel's AutoScroll property to true, the controls contained in the Panel
cannot be visible fully from the TagPage, because the Panel itself is not
visible fully in the TabPage.

Why not set the Panel to the same height of the TabPage, i.e 50 rows height
and set the Panel's AutoScroll property to true?

Sincerely,
Linda Liu
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.


Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.1 (NET v2.0) - 9/10/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.057 seconds.