Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Adding a ScrollBar to a frame
 

Adding a ScrollBar to a frame

How can i "link" a scroll bar to a frame so that the scroll bar isa member of the frame? I have created the two controls using the toolbox but i would like the frame to be the parent of the scroll bar so i can use the position of the scroll bar in my code. I have tried Frame1.Controls.Add(HScrollBar1) But HScrollBar1 Is not a member of Frame1 when i try and use a line like: Frame1.HScrollBar1.Visible = True. How can i link them together?

Cordialement,
Miller


If you're not living on the edge, you're taking up too much room
Miller_a  Friday, September 25, 2009 9:46 AM
Frame is a control that is standard with .Net, I have asked my question in the wrong forum. Sorry everyone!
I will repost it in the vbgeneral forum.
If you're not living on the edge, you're taking up too much room
  • Marked As Answer byMiller_a Monday, September 28, 2009 8:23 AM
  •  
Miller_a  Monday, September 28, 2009 8:21 AM
Is Frame a .Net control that comes with .Net? Or is it a custom control? I did not see any control named Frame for WinForms. Is this WinForms, or is it WPF?

And why do you want to be able to write code like Frame1.HScrollBar1.Visible? I mean, why is it important? Doesn't it work the same as HScrollBar1.Visible??

Remember that even though the container of the control is the Frame control you refer to, the variable is declared in the designer file of the form, which makes it directly accessible in the code file.
MCP
webJose  Sunday, September 27, 2009 8:34 PM
Frame is a control that is standard with .Net, I have asked my question in the wrong forum. Sorry everyone!
I will repost it in the vbgeneral forum.
If you're not living on the edge, you're taking up too much room
  • Marked As Answer byMiller_a Monday, September 28, 2009 8:23 AM
  •  
Miller_a  Monday, September 28, 2009 8:21 AM

You can use google to search for other answers

Custom Search

More Threads

• Web Form Designer
• Object does not match target type.
• Adding References in the Design Time automatically
• Developing a Keyboard component
• Custom Tree control -images not getting rendered on some machines
• How can I add backgroundimage in Designer Form(DesignSurface)??
• panel anchor bug
• Problems with localized UserControl
• Dark (abnormal) Selection grabs of controls in a container control
• ToolboxBitmap doesn't work