CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2000
    Location
    Bremen, Germany
    Posts
    1

    splitter windows



    I´ve created a new vb5 project based on the explorer-like template.

    After that i´ve deleted the treeview-control and used a listbox with the

    same name. when i now drag the "line" between the two controls, its not

    displayed while moving the mouse with button pressed to the left side.

    When i move the mouse to the right side (listview control) the splitter pane

    is display.

    what´s wrong or what must i do ?

  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: splitter windows





    Hi,


    I think the problem is with Z-Order. VB keeps track of the order in which controls are created, so that in the event that one were to come on top of other (except one of them is a container ) the control which was created later will be on top of the z-order.


    I am assuming you are faking the splitter appearence with some other control.

    (I have done a similar 3-view/2splitter code myself.)

    Now since your List box was created later that your splitter control , it has higher precedence in z-order. Hence set z-oder of the splitter control, while dragging to vbBringtoFront, then at the end of dragging, BE SURE to set it

    to vbSendtoback. If your splitter control is too thin, you may have problem of not recognising the mouse move on it, because it is now on the back of z-order.


    Another simpler solution would be

    1.remember the name of your splitter control including index, if any

    2.Delete it

    3.Create a new instance and name it as the old fellow. This will make sure that

    the new instance has higher precedence than the listbox.


    But your problem might persist when ever you happen to add controls again.

    Soln.1 is a good idea.


    Ravi Kiran

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