CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2006
    Posts
    17

    [RESOLVED] Embedded panels behaviour

    Hi,
    In VB6 I could embed a panel or picturebox containing controls or images within an outer panel or picturebox. If I moved the outer control then the embedded panel would move with the outer panel and stay in the same relative position, which is what I require. This doesn't seem to happen in VB.NET, the internal panel stays fixed in its location, even if I have pasted this panel within the outer container. Is there are trick to this or do I have to code to get the internal panel to move with the outer one? How does an internal container remain embedded within an outer one?
    ..Thanks

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Embedded panels behaviour

    I have used panels within panels in VB.Net but have not experienced what you speak of.

    What version of VB.Net are you using?
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Embedded panels behaviour

    The internal Panel's Parent has not set up properly.. MAKE SURE you place it firmly in the middle of the panel you want it to be a child of.

    If you've placed it with the top left corner matching the position of the panel you want it inside, it may take the form as it's parent and will only move with the form..
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  4. #4
    Join Date
    Aug 2009
    Location
    NW USA
    Posts
    173

    Re: Embedded panels behaviour

    Per GremilnUSA, in the designer you can View-Other Windows-Document Outline to see the parent of the object and actually move it if necessary (like under the correct parent)

  5. #5
    Join Date
    Jun 2006
    Posts
    17

    Re: Embedded panels behaviour

    Ok thanks for that, guess that was the problem as in other cases it appears to work. (I'm using vb2005).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured