exscrollbar - sample code

How do I change the caption for the extra button I added?

VBA (MS Access, Excell...)

With ScrollBar1
	.VisiblePart(32768) = True
	.Caption(32768) = "<img>0</img>extra button"
End With

VB6

With ScrollBar1
	.VisiblePart(exLeftB1Part) = True
	.Caption(exLeftB1Part) = "<img>0</img>extra button"
End With

VB.NET

With Exscrollbar1
	.set_VisiblePart(exontrol.EXSCROLLBARLib.PartEnum.exLeftB1Part,True)
	.set_Caption(exontrol.EXSCROLLBARLib.PartEnum.exLeftB1Part,"<img>0</img>extra button")
End With

VB.NET for /COM

With AxScrollBar1
	.set_VisiblePart(EXSCROLLBARLib.PartEnum.exLeftB1Part,True)
	.set_Caption(EXSCROLLBARLib.PartEnum.exLeftB1Part,"<img>0</img>extra button")
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSCROLLBARLib' for the library: 'ExScrollBar 1.0 Control Library'

	#import <ExScrollBar.dll>
	using namespace EXSCROLLBARLib;
*/
EXSCROLLBARLib::IScrollBarPtr spScrollBar1 = GetDlgItem(IDC_SCROLLBAR1)->GetControlUnknown();
spScrollBar1->PutVisiblePart(EXSCROLLBARLib::exLeftB1Part,VARIANT_TRUE);
spScrollBar1->PutCaption(EXSCROLLBARLib::exLeftB1Part,L"<img>0</img>extra button");

C++ Builder

ScrollBar1->VisiblePart[Exscrollbarlib_tlb::PartEnum::exLeftB1Part] = true;
ScrollBar1->Caption[Exscrollbarlib_tlb::PartEnum::exLeftB1Part] = L"<img>0</img>extra button";

C#

exscrollbar1.set_VisiblePart(exontrol.EXSCROLLBARLib.PartEnum.exLeftB1Part,true);
exscrollbar1.set_Caption(exontrol.EXSCROLLBARLib.PartEnum.exLeftB1Part,"<img>0</img>extra button");

JavaScript

<OBJECT classid="clsid:5DE2B956-5AB5-47EE-8225-6AB7F9B4FC18" id="ScrollBar1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	ScrollBar1.VisiblePart(32768) = true;
	ScrollBar1.Caption(32768) = "<img>0</img>extra button";
</SCRIPT>

C# for /COM

axScrollBar1.set_VisiblePart(EXSCROLLBARLib.PartEnum.exLeftB1Part,true);
axScrollBar1.set_Caption(EXSCROLLBARLib.PartEnum.exLeftB1Part,"<img>0</img>extra button");

X++ (Dynamics Ax 2009)

public void init()
{
	;

	super();

	exscrollbar1.VisiblePart(32768/*exLeftB1Part*/,true);
	exscrollbar1.Caption(32768/*exLeftB1Part*/,"<img>0</img>extra button");
}

Delphi 8 (.NET only)

with AxScrollBar1 do
begin
	set_VisiblePart(EXSCROLLBARLib.PartEnum.exLeftB1Part,True);
	set_Caption(EXSCROLLBARLib.PartEnum.exLeftB1Part,'<img>0</img>extra button');
end

Delphi (standard)

with ScrollBar1 do
begin
	VisiblePart[EXSCROLLBARLib_TLB.exLeftB1Part] := True;
	Caption[EXSCROLLBARLib_TLB.exLeftB1Part] := '<img>0</img>extra button';
end

VFP

with thisform.ScrollBar1
	.Object.VisiblePart(32768) = .T.
	.Object.Caption(32768) = "<img>0</img>extra button"
endwith

dBASE Plus

local oScrollBar

oScrollBar = form.Activex1.nativeObject
oScrollBar.Template = [VisiblePart(32768) = true] // oScrollBar.VisiblePart(32768) = true
oScrollBar.Template = [Caption(32768) = "<img>0</img>extra button"] // oScrollBar.Caption(32768) = "<img>0</img>extra button"

XBasic (Alpha Five)

Dim oScrollBar as P

oScrollBar = topparent:CONTROL_ACTIVEX1.activex
oScrollBar.Template = "VisiblePart(32768) = True" ' oScrollBar.VisiblePart(32768) = .t.
oScrollBar.Template = "Caption(32768) = \"<img>0</img>extra button\"" ' oScrollBar.Caption(32768) = "<img>0</img>extra button"

Visual Objects


oDCOCX_Exontrol1:[VisiblePart,exLeftB1Part] := true
oDCOCX_Exontrol1:[Caption,exLeftB1Part] := "<img>0</img>extra button"

PowerBuilder

OleObject oScrollBar

oScrollBar = ole_1.Object
oScrollBar.VisiblePart(32768,true)
oScrollBar.Caption(32768,"<img>0</img>extra button")

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Set ComVisiblePart OLEexLeftB1Part to True
	Set ComCaption OLEexLeftB1Part to "<img>0</img>extra button"
End_Procedure

XBase++

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oScrollBar

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oScrollBar := XbpActiveXControl():new( oForm:drawingArea )
	oScrollBar:CLSID  := "Exontrol.ScrollBar.1" /*{5DE2B956-5AB5-47EE-8225-6AB7F9B4FC18}*/
	oScrollBar:create(,, {10,60},{610,370} )

		oScrollBar:SetProperty("VisiblePart",32768/*exLeftB1Part*/,.T.)
		oScrollBar:SetProperty("Caption",32768/*exLeftB1Part*/,"<img>0</img>extra button")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN