exbutton - sample code

Does your control support subscript or superscript, in HTML captions?

VBA (MS Access, Excell...)

With Button1
	.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s" & _
"uperscript</off></font></sha> support"
End With

VB6

With Button1
	.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s" & _
"uperscript</off></font></sha> support"
End With

VB.NET

With Exbutton1
	.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s" & _
"uperscript</off></font></sha> support"
End With

VB.NET for /COM

With AxButton1
	.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s" & _
"uperscript</off></font></sha> support"
End With

C++

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

	#import <ExButton.dll>
	using namespace EXBUTTONLib;
*/
EXBUTTONLib::IButtonPtr spButton1 = GetDlgItem(IDC_BUTTON1)->GetControlUnknown();
spButton1->PutCaption(_bstr_t("Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s") +
"uperscript</off></font></sha> support");

C++ Builder

Button1->Caption = TVariant(String("Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s") +
"uperscript</off></font></sha> support");

C#

exbutton1.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s" +
"uperscript</off></font></sha> support";

JScript/JavaScript

<BODY onload='Init()'>
<OBJECT CLASSID="clsid:F3A2203A-6B28-4A74-9DC9-4065D1C0A29D" id="Button1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	Button1.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s" +
	"uperscript</off></font></sha> support";
}
</SCRIPT>
</BODY>

VBScript

<BODY onload='Init()'>
<OBJECT CLASSID="clsid:F3A2203A-6B28-4A74-9DC9-4065D1C0A29D" id="Button1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Button1
		.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s" & _
	"uperscript</off></font></sha> support"
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

axButton1.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>s" +
"uperscript</off></font></sha> support";

X++ (Dynamics Ax 2009)

public void init()
{
	str var_s;
	;

	super();

	var_s = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>su";
	var_s = var_s + "perscript</off></font></sha> support";
	exbutton1.Caption(var_s);
}

Delphi 8 (.NET only)

with AxButton1 do
begin
	Caption := 'Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>su' + 
	'perscript</off></font></sha> support';
end

Delphi (standard)

with Button1 do
begin
	Caption := 'Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>su' + 
	'perscript</off></font></sha> support';
end

VFP

with thisform.Button1
	var_s = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>su"
	var_s = var_s + "perscript</off></font></sha> support"
	.Caption = var_s
endwith

dBASE Plus

local oButton

oButton = form.Activex1.nativeObject
oButton.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>superscript</off></font></sha> support"

XBasic (Alpha Five)

Dim oButton as P

oButton = topparent:CONTROL_ACTIVEX1.activex
oButton.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>superscript</off></font></sha> support"

Visual Objects


oDCOCX_Exontrol1:Caption := "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>superscript</off></font></sha> support"

PowerBuilder

OleObject oButton

oButton = ole_1.Object
oButton.Caption = "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>superscript</off></font></sha> support"

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Set ComCaption to "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>superscript</off></font></sha> support"
End_Procedure

XBase++

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

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

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

	oButton := XbpActiveXControl():new( oForm:drawingArea )
	oButton:CLSID  := "Exontrol.Button.1" /*{F3A2203A-6B28-4A74-9DC9-4065D1C0A29D}*/
	oButton:create(,, {10,60},{610,370} )

		oButton:Caption := "Text with <font ;7><off 6><sha ;;0>subscript</off></font></sha> and <font ;7><off -6><sha ;;0>superscript</off></font></sha> support"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
Copyright 1999-2017 Exontrol. All rights reserved.