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

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • On-demand Event Event Date: October 23, 2014 Despite the current "virtualize everything" mentality, there are advantages to utilizing physical hardware for certain tasks. This is especially true for backups. In many cases, it is clearly in an organization's best interest to make use of physical, purpose-built backup appliances rather than relying on virtual backup software (VBA - Virtual Backup Appliances). Join us for this webcast to learn why physical appliances are preferable to virtual backup appliances, …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds