The eXSplitBar control provides automatic resizing /positioning of controls/windows on your form/dialog/window. When the Mode property is set to exSplitBarHorz, the control resizes any controls that lie above or below it, and when the Mode is set to exSplitBarVert, it resizes controls that lie to its left or right. The difference between the eXSplitBar control and other components of the same type, is that the eXSplitBar control works for any programming environments such as Microsoft Office ( Microsoft Access, Microsoft Excel, Microsoft Word ), Visual Basic, Visual Fox Pro, /NET Framework, Delphi, C++,
C++ Builder, dBASE Plus and more.
Shortly, the eXSplitBar component splits the form/dialog/window in two
pieces, left/top and right/bottom parts. in order to use the control, all
it is required is to specify which objects/controls/windows make part of
the left/top side of the split bar, and which to right/bottom side of the
split bar. Having this, the objects are automatically resizes the left/right or top/bottom components, while user drags the split bar to a new
position
Here's the steps you need to follow in order to use the eXSplitBar
control:
- Insert the eXSplitBar library/reference to your project ( follow the
"inserting the component to a form/dialog" here
)
- Place eXSplitBar control to your form/dialog/window
- Specify the objects in the left/top and right/bottom parts of the
split bar, using the ObjectsLT / ObjectsRB or AddObjectLT /
AddObjectRB available at runtime.
For instance, let's say we have the following layout:
so we have two split bars ( horizontal and vertical ), and three
buttons/commands. One splitter should resizes the left-most button, and
the rest, and the vertical split bar show resize the top-most button and
the bellow one.
In
- C# for /NET Assembly
- Microsoft Office ( Access, Excel, Word )
- Visual Basic 6
- Visual Basic for /NET Assembly
- Visual FoxPro
you can select the split bar in design mode, and specify the
objects in the left/top and right/bottom parts of the split bar as in the
following screen shot, using the ObjectsLT and ObjectsRB properties:
In
- C++ Builder
- C# for /COM on /NET Framework
- Delphi
- dBASE Plus
- Visual Basic for /COM on /NET Framework
- Visual C++
you need to use the AddObjectLT and AddObjectRB methods as in the
following samples.
C++ Builder :
SplitBar1->AddObjectLT(TVariant(Button1->Handle));
SplitBar1->AddObjectRB(TVariant(Button2->Handle));
SplitBar1->AddObjectRB(TVariant(SplitBar2->DefaultInterface));
SplitBar1->AddObjectRB(TVariant(Button3->Handle));
C# for /COM on /NET Framework :
axSplitBar1.AddObjectLT(button1);
axSplitBar1.AddObjectRB(button2);
axSplitBar1.AddObjectRB(axSplitBar2);
axSplitBar1.AddObjectRB(button3);
Delphi :
with SplitBar1 do
begin
AddObjectLT(Button1.Handle);
AddObjectRB(Button2.Handle);
AddObjectRB(SplitBar2.DefaultInterface);
AddObjectRB(Button3.Handle);
end
dBASE Plus :
this.EXSPLITBARACTIVEXCONTROL1.nativeobject.AddObjectLT(this.PUSHBUTTON1.hwnd)
this.EXSPLITBARACTIVEXCONTROL1.nativeobject.AddObjectRB(this.PUSHBUTTON2.hwnd)
this.EXSPLITBARACTIVEXCONTROL1.nativeobject.AddObjectRB(this.EXSPLITBARACTIVEXCONTROL2.nativeobject.hwnd)
this.EXSPLITBARACTIVEXCONTROL1.nativeobject.AddObjectRB(this.PUSHBUTTON3.hwnd)
Note: In case the object you want to add to a part of the split bar does not
provide a hwnd property or return 0, add the control itself to a container
object, and uses the container's hwnd property for AddObjectLT /
AddObjectRB methods.
Visual Basic for /COM on /NET Framework:
With AxSplitBar1
.AddObjectLT(Button1)
.AddObjectRB(Button2)
.AddObjectRB(AxSplitBar2)
.AddObjectRB(Button3)
End With
Visual C++:
EXSPLITBARLib::ISplitBarPtr spSplitBar1 = GetDlgItem(IDC_SPLITBAR1)->GetControlUnknown();
spSplitBar1->AddObjectLT( (long)::GetDlgItem( m_hWnd, IDC_BUTTON1 ) );
spSplitBar1->AddObjectRB( (long)::GetDlgItem( m_hWnd, IDC_BUTTON2 ) );
spSplitBar1->AddObjectRB( GetDlgItem(IDC_SPLITBAR2)->GetControlUnknown() );
spSplitBar1->AddObjectRB( (long)::GetDlgItem( m_hWnd, IDC_BUTTON3 ) );