method SplitBar.AddObjectRB (newVal as Variant)
Adds a new object to be updated in the right/bttom part of the split bar.

TypeDescription
newVal as Variant A Variant expression that could be one of the following:
  • String expression that indicates the name of the component.  For instance: AddObjectRB( "Command1" )
  • A String expression that represents a number, which is the handle of the window. For instance, AddObjectRB( CStr(Grid1.hWnd) )

As string, the AddObjectRB method can add multiple values at the same time, if passing a string, with values as explained above, separated by comma character. For instance: AddObjectRB( "Command1,Command2," + CStr(Grid1.hWnd) )

  • A numeric expression that indicates the handle of the window. For instance, AddObjectRB( Grid1.hWnd )
  • An IUnknown interface, that indicates a reference to the object to be anchored ( /COM only ). For instance, AddObjectRB( GetDlgItem(IDC_SPLITBAR1)->GetControlUnknown() ), VC++
  • A IDispatch interface, that indicates a reference to the object to be anchored ( /COM only ). For instance, AddObjectRB( SplitBar1.DefaultInterface ), Delphi
  • An object of Control (System.Windows.Forms) type that specifies the control ( /NET assembly ). For instance, AddObjectRB( exgrid1 ), C#

A safe array of a VARIANT type, with any value explained above. For instance, AddObjectRB( Array("Command1", Command2, Grid1.hWnd ) ), VB/NET

The AddObjectRB method adds at runtime, a new object to be updated in the right/bottom part of the split bar. The ObjectsRB property defines the objects to be updated on the right/bottom side of the split bar. The ObjectsLT property defines the controls associated with the left/top side of the split bar at design mode. The Mode property specifies whether the split bar moves objects horizontally or vertically. 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. Setting the ObjectsRB property on "" ( empty string ), releases any control/object that has been previously anchored to the slit bar, including the objects being added with the AddObjectRB method, or the split bar has nothing attached to its left/top side. The LimitRB property specifies the expression that determines the limit to drag the splitter to right/bottom side of its container.

By default, if a control/component/object is contained in 

In 

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

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 ) );