A Splitter WIndow Control For VB

Environment VB6

This is a simple User-Control for easily creating a "splitter-window-like" outfit with any two controls on your VB-form.

screenshot

Steps to generate this:
  1. Place the ctlSplitterEx on your form an size it.
  2. Place two other control on your form which you want to be splitted. The size & position on these controls doesn't matter. They will be resized and placed at runtime so they will hide the cltSplitterEx at runtime nearly completely.
  3. Attach the two controls to the ctlSplitterEx by invoking ctlSplitterEx.AttachObject
  4. Define the TileMode to horizontally/vertically by setting ctlSplitterEx.TileMode - Property. [default: horizontally]
  5. Define the position of the tilebar by setting the ctlSplitterEx.TilePercenze - Property. [default: 30%]

Example to generate a splitter window with a textbox on the right an a button on the left:


'
'
private Sub Form_Load()
	me.ctlSplitterEx1.AttachObjects me.Text1, me.Command1, true
	me.ctlSplitterEx1.TileMode = TILE_VERTICALLY
End Sub
'
'


If you enjoy this control send me an email.

Download zipped source and demo project (3k)



Comments

  • Splitter Control

    Posted by ncampbell on 07/31/2008 10:16am

    I have an application that was designed by a former employee and I'm only now making changes to it. Randomly (but more often than not) I get an error "Method 'AttachObjects' of object '_ctlSplitterEx' failed" I have googled this error to death and stepped through the program and have found that when I get to the sub procedure "FindOwnInstance" For i = 0 To UserControl.ParentControls.Count - 1 If TypeOf UserControl.ParentControls.Item(i) Is ctlSplitterEx Then <------------------ this is where it errors out! If UserControl.ParentControls.Item(i).hwnd = Myhwnd Then Set m_oMe = UserControl.ParentControls.Item(i) Exit For End If End If Next ------------------------------------------------------ This application has been programmed in VB 6.0 and I'm totally at a loss! Can you help?

    Reply
  • 3 panel split

    Posted by mocolt on 12/01/2004 01:31am

    How do I make this into 3 panel split? 1 panel on the left and 2 on the left (1 on top of each other). Can someone help me?

    Reply
  • Excellent

    Posted by Legacy on 10/19/2003 12:00am

    Originally posted by: Brian G

    Works perfectly, top notch stuff, thank you very much!

    Reply
  • Good Work, but is there a way...

    Posted by Legacy on 10/17/2003 12:00am

    Originally posted by: Peter C

    Good Work, but is there a way to "grab" and show the "dragging" of the splitter while increasing the slitter width? 
    
    

    For the moment, you can only grab it, but cannot see the resize bar overtop the controls when positioning. There is no flicking effect...

    Regards,

    Peter C.

    Reply
  • Just great!

    Posted by Legacy on 09/16/2003 12:00am

    Originally posted by: Roger Paini

    This is great code! Very useful!

    Reply
  • Control Splitter

    Posted by Legacy on 09/13/2003 12:00am

    Originally posted by: Ramniwas Yadav

    I find it very useful for my Project.

    Thnaks for thi stype of Help

    Reply
  • How do I do this ...

    Posted by Legacy on 09/10/2003 12:00am

    Originally posted by: eamonn

    I have used your control and like it a lot. In my application I want to split the screen into a left and right section. On the left hand side I want 2 controls, one on top of the other. On the right I just want one control filling the whole height of the application window. I have tried the following...
    
    

    Me.ctlSplitterEx1.AttachObjects Me.ctlSplitterEx2, Me.Frame1, True
    Me.ctlSplitterEx2.AttachObjects Me.TreeView1, Me.Frame2, True
    Me.ctlSplitterEx1.TileMode = TILE_HORIZONTALLY
    Me.ctlSplitterEx2.TileMode = TILE_VERTICALLY
    Me.ctlSplitterEx1.TilePercent = 90
    Me.ctlSplitterEx2.TilePercent = 35

    but find that the control that I want to appear in the bottom left corner of the window (frame1) actually appears for the whole width of the window.

    Reply
  • Splitter Position

    Posted by Legacy on 07/08/2003 12:00am

    Originally posted by: Peter Maslin

    hi there

    Great controll , but how do you get/set the splitter position , i cant find anything in the controll to allow me to set where the splitter bar is.

    Peter

    Reply
  • I Have a little problem whit yor control

    Posted by Legacy on 11/08/2002 12:00am

    Originally posted by: Rupelstinsky

    i've already used yor control in several forms but now I'm trying it with a form who has other 30 controls and shows an error on the memory
    Do you know smth about it?

    Thanks in advanced


    Reply
  • It's what I was looking for.

    Posted by Legacy on 03/14/2002 12:00am

    Originally posted by: �lvaro

    Hi,
    Actually, your control is very good and it actually fits the specs I have for my forms.
    Thanks!

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • U.S. companies are desperately trying to recruit and hire skilled software engineers and developers, but there is simply not enough quality talent to go around. Tiempo Development is a nearshore software development company. Our headquarters are in AZ, but we are a pioneer and leader in outsourcing to Mexico, based on our three software development centers there. We have a proven process and we are experts at providing our customers with powerful solutions. We transform ideas into reality.

  • When individual departments procure cloud service for their own use, they usually don't consider the hazardous organization-wide implications. Read this paper to learn best practices for setting up an internal, IT-based cloud brokerage function that service the entire organization. Find out how this approach enables you to retain top-down visibility and control of network security and manage the impact of cloud traffic on your WAN.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date