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

  • Java developers know that testing code changes can be a huge pain, and waiting for an application to redeploy after a code fix can take an eternity. Wouldn't it be great if you could see your code changes immediately, fine-tune, debug, explore and deploy code without waiting for ages? In this white paper, find out how that's possible with a Java plugin that drastically changes the way you develop, test and run Java applications. Discover the advantages of this plugin, and the changes you can expect to see …

  • With 81% of employees using their phones at work, companies have stopped asking: "Is corporate data leaking from personal devices?" and started asking: "How do we effectively prevent corporate data from leaking from personal devices?" The answer has not been simple. ZixOne raises the bar on BYOD security by not allowing email data to reside on the device. In addition, Zix allows employees to maintain complete control of their personal device, therefore satisfying privacy demands of valued employees and the …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds