exradialmenu - sample code

How can I load items to the control?

VBA (MS Access, Excell...)

With RadialMenu1
	.BeginUpdate 
	.Expanded = True
	.PicturesPath = "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
	.HTMLPicture("arrow") = "arrow.png"
	.SubItemsBackColor = RGB(190,190,190)
	.ShadowColor = .SubItemsBackColor
	.RadialLineColor(6) = .SubItemsBackColor
	.RadialLineColor(5) = -1
	With .Items
		.Add("Foreground-Color","color_line.png").Items.ToString = "Foreground"
		.Add("Background-Color","color_fill.png").Items.ToString = "Background"
		.Add("Font","format_font_size_less.png").Items.ToString = "Font"
		.Add("Undo","edit_undo.png").Items.ToString = "Undo"
		.Add("Redo","edit_redo.png").Items.ToString = "Redo"
		.Add("Copy","edit_copy.png").Items.ToString = "Copy"
		.Add("List","fileview_text.png").Items.ToString = "List"
		.Add("Tag","checkmark_korganizer.png").Items.ToString = "Tag"
	End With
	.EndUpdate 
End With

VB6

With RadialMenu1
	.BeginUpdate 
	.Expanded = True
	.PicturesPath = "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
	.HTMLPicture("arrow") = "arrow.png"
	.SubItemsBackColor = RGB(190,190,190)
	.ShadowColor = .SubItemsBackColor
	.RadialLineColor(exRadialParentBorder) = .SubItemsBackColor
	.RadialLineColor(exRadialItemsGridLines) = -1
	With .Items
		.Add("Foreground-Color","color_line.png").Items.ToString = "Foreground"
		.Add("Background-Color","color_fill.png").Items.ToString = "Background"
		.Add("Font","format_font_size_less.png").Items.ToString = "Font"
		.Add("Undo","edit_undo.png").Items.ToString = "Undo"
		.Add("Redo","edit_redo.png").Items.ToString = "Redo"
		.Add("Copy","edit_copy.png").Items.ToString = "Copy"
		.Add("List","fileview_text.png").Items.ToString = "List"
		.Add("Tag","checkmark_korganizer.png").Items.ToString = "Tag"
	End With
	.EndUpdate 
End With

VB.NET

With Exradialmenu1
	.BeginUpdate()
	.Expanded = True
	.PicturesPath = "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
	.set_HTMLPicture("arrow","arrow.png")
	.SubItemsBackColor = Color.FromArgb(190,190,190)
	.ShadowColor = .SubItemsBackColor
	.set_RadialLineColor(exontrol.EXRADIALMENULib.RadialLineEnum.exRadialParentBorder,.SubItemsBackColor)
	.set_RadialLineColor32(exontrol.EXRADIALMENULib.RadialLineEnum.exRadialItemsGridLines,-1)
	With .Items
		.Add("Foreground-Color","color_line.png").Items.ToString = "Foreground"
		.Add("Background-Color","color_fill.png").Items.ToString = "Background"
		.Add("Font","format_font_size_less.png").Items.ToString = "Font"
		.Add("Undo","edit_undo.png").Items.ToString = "Undo"
		.Add("Redo","edit_redo.png").Items.ToString = "Redo"
		.Add("Copy","edit_copy.png").Items.ToString = "Copy"
		.Add("List","fileview_text.png").Items.ToString = "List"
		.Add("Tag","checkmark_korganizer.png").Items.ToString = "Tag"
	End With
	.EndUpdate()
End With

VB.NET for /COM

With AxRadialMenu1
	.BeginUpdate()
	.Expanded = True
	.PicturesPath = "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
	.set_HTMLPicture("arrow","arrow.png")
	.SubItemsBackColor = RGB(190,190,190)
	.ShadowColor = .SubItemsBackColor
	.set_RadialLineColor(EXRADIALMENULib.RadialLineEnum.exRadialParentBorder,.SubItemsBackColor)
	.set_RadialLineColor(EXRADIALMENULib.RadialLineEnum.exRadialItemsGridLines,-1)
	With .Items
		.Add("Foreground-Color","color_line.png").Items.ToString = "Foreground"
		.Add("Background-Color","color_fill.png").Items.ToString = "Background"
		.Add("Font","format_font_size_less.png").Items.ToString = "Font"
		.Add("Undo","edit_undo.png").Items.ToString = "Undo"
		.Add("Redo","edit_redo.png").Items.ToString = "Redo"
		.Add("Copy","edit_copy.png").Items.ToString = "Copy"
		.Add("List","fileview_text.png").Items.ToString = "List"
		.Add("Tag","checkmark_korganizer.png").Items.ToString = "Tag"
	End With
	.EndUpdate()
End With

C++

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

	#import <ExRadialMenu.dll>
	using namespace EXRADIALMENULib;
*/
EXRADIALMENULib::IRadialMenuPtr spRadialMenu1 = GetDlgItem(IDC_RADIALMENU1)->GetControlUnknown();
spRadialMenu1->BeginUpdate();
spRadialMenu1->PutExpanded(VARIANT_TRUE);
spRadialMenu1->PutPicturesPath(L"C:\\Program Files\\Exontrol\\ExRadialMenu\\Sample\\Images");
spRadialMenu1->PutHTMLPicture(L"arrow","arrow.png");
spRadialMenu1->PutSubItemsBackColor(RGB(190,190,190));
spRadialMenu1->PutShadowColor(spRadialMenu1->GetSubItemsBackColor());
spRadialMenu1->PutRadialLineColor(EXRADIALMENULib::exRadialParentBorder,spRadialMenu1->GetSubItemsBackColor());
spRadialMenu1->PutRadialLineColor(EXRADIALMENULib::exRadialItemsGridLines,-1);
EXRADIALMENULib::IItemsPtr var_Items = spRadialMenu1->GetItems();
	var_Items->Add(L"Foreground-Color","color_line.png",vtMissing)->GetItems()->PutToString(L"Foreground");
	var_Items->Add(L"Background-Color","color_fill.png",vtMissing)->GetItems()->PutToString(L"Background");
	var_Items->Add(L"Font","format_font_size_less.png",vtMissing)->GetItems()->PutToString(L"Font");
	var_Items->Add(L"Undo","edit_undo.png",vtMissing)->GetItems()->PutToString(L"Undo");
	var_Items->Add(L"Redo","edit_redo.png",vtMissing)->GetItems()->PutToString(L"Redo");
	var_Items->Add(L"Copy","edit_copy.png",vtMissing)->GetItems()->PutToString(L"Copy");
	var_Items->Add(L"List","fileview_text.png",vtMissing)->GetItems()->PutToString(L"List");
	var_Items->Add(L"Tag","checkmark_korganizer.png",vtMissing)->GetItems()->PutToString(L"Tag");
spRadialMenu1->EndUpdate();

C++ Builder

RadialMenu1->BeginUpdate();
RadialMenu1->Expanded = true;
RadialMenu1->PicturesPath = L"C:\\Program Files\\Exontrol\\ExRadialMenu\\Sample\\Images";
RadialMenu1->HTMLPicture[L"arrow"] = TVariant("arrow.png");
RadialMenu1->SubItemsBackColor = RGB(190,190,190);
RadialMenu1->ShadowColor = RadialMenu1->SubItemsBackColor;
RadialMenu1->RadialLineColor[Exradialmenulib_tlb::RadialLineEnum::exRadialParentBorder] = RadialMenu1->SubItemsBackColor;
RadialMenu1->RadialLineColor[Exradialmenulib_tlb::RadialLineEnum::exRadialItemsGridLines] = -1;
Exradialmenulib_tlb::IItemsPtr var_Items = RadialMenu1->Items;
	var_Items->Add(L"Foreground-Color",TVariant("color_line.png"),TNoParam())->Items->ToString = L"Foreground";
	var_Items->Add(L"Background-Color",TVariant("color_fill.png"),TNoParam())->Items->ToString = L"Background";
	var_Items->Add(L"Font",TVariant("format_font_size_less.png"),TNoParam())->Items->ToString = L"Font";
	var_Items->Add(L"Undo",TVariant("edit_undo.png"),TNoParam())->Items->ToString = L"Undo";
	var_Items->Add(L"Redo",TVariant("edit_redo.png"),TNoParam())->Items->ToString = L"Redo";
	var_Items->Add(L"Copy",TVariant("edit_copy.png"),TNoParam())->Items->ToString = L"Copy";
	var_Items->Add(L"List",TVariant("fileview_text.png"),TNoParam())->Items->ToString = L"List";
	var_Items->Add(L"Tag",TVariant("checkmark_korganizer.png"),TNoParam())->Items->ToString = L"Tag";
RadialMenu1->EndUpdate();

C#

exradialmenu1.BeginUpdate();
exradialmenu1.Expanded = true;
exradialmenu1.PicturesPath = "C:\\Program Files\\Exontrol\\ExRadialMenu\\Sample\\Images";
exradialmenu1.set_HTMLPicture("arrow","arrow.png");
exradialmenu1.SubItemsBackColor = Color.FromArgb(190,190,190);
exradialmenu1.ShadowColor = exradialmenu1.SubItemsBackColor;
exradialmenu1.set_RadialLineColor(exontrol.EXRADIALMENULib.RadialLineEnum.exRadialParentBorder,exradialmenu1.SubItemsBackColor);
exradialmenu1.set_RadialLineColor32(exontrol.EXRADIALMENULib.RadialLineEnum.exRadialItemsGridLines,-1);
exontrol.EXRADIALMENULib.Items var_Items = exradialmenu1.Items;
	var_Items.Add("Foreground-Color","color_line.png",null).Items.ToString = "Foreground";
	var_Items.Add("Background-Color","color_fill.png",null).Items.ToString = "Background";
	var_Items.Add("Font","format_font_size_less.png",null).Items.ToString = "Font";
	var_Items.Add("Undo","edit_undo.png",null).Items.ToString = "Undo";
	var_Items.Add("Redo","edit_redo.png",null).Items.ToString = "Redo";
	var_Items.Add("Copy","edit_copy.png",null).Items.ToString = "Copy";
	var_Items.Add("List","fileview_text.png",null).Items.ToString = "List";
	var_Items.Add("Tag","checkmark_korganizer.png",null).Items.ToString = "Tag";
exradialmenu1.EndUpdate();

JScript/JavaScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:1604BDE1-D48F-4D3F-B51B-49C0CD74236C" id="RadialMenu1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	RadialMenu1.BeginUpdate();
	RadialMenu1.Expanded = true;
	RadialMenu1.PicturesPath = "C:\\Program Files\\Exontrol\\ExRadialMenu\\Sample\\Images";
	RadialMenu1.HTMLPicture("arrow") = "arrow.png";
	RadialMenu1.SubItemsBackColor = 12500670;
	RadialMenu1.ShadowColor = RadialMenu1.SubItemsBackColor;
	RadialMenu1.RadialLineColor(6) = RadialMenu1.SubItemsBackColor;
	RadialMenu1.RadialLineColor(5) = -1;
	var var_Items = RadialMenu1.Items;
		var_Items.Add("Foreground-Color","color_line.png",null).Items.ToString = "Foreground";
		var_Items.Add("Background-Color","color_fill.png",null).Items.ToString = "Background";
		var_Items.Add("Font","format_font_size_less.png",null).Items.ToString = "Font";
		var_Items.Add("Undo","edit_undo.png",null).Items.ToString = "Undo";
		var_Items.Add("Redo","edit_redo.png",null).Items.ToString = "Redo";
		var_Items.Add("Copy","edit_copy.png",null).Items.ToString = "Copy";
		var_Items.Add("List","fileview_text.png",null).Items.ToString = "List";
		var_Items.Add("Tag","checkmark_korganizer.png",null).Items.ToString = "Tag";
	RadialMenu1.EndUpdate();
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:1604BDE1-D48F-4D3F-B51B-49C0CD74236C" id="RadialMenu1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With RadialMenu1
		.BeginUpdate 
		.Expanded = True
		.PicturesPath = "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
		.HTMLPicture("arrow") = "arrow.png"
		.SubItemsBackColor = RGB(190,190,190)
		.ShadowColor = .SubItemsBackColor
		.RadialLineColor(6) = .SubItemsBackColor
		.RadialLineColor(5) = -1
		With .Items
			.Add("Foreground-Color","color_line.png").Items.ToString = "Foreground"
			.Add("Background-Color","color_fill.png").Items.ToString = "Background"
			.Add("Font","format_font_size_less.png").Items.ToString = "Font"
			.Add("Undo","edit_undo.png").Items.ToString = "Undo"
			.Add("Redo","edit_redo.png").Items.ToString = "Redo"
			.Add("Copy","edit_copy.png").Items.ToString = "Copy"
			.Add("List","fileview_text.png").Items.ToString = "List"
			.Add("Tag","checkmark_korganizer.png").Items.ToString = "Tag"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

axRadialMenu1.BeginUpdate();
axRadialMenu1.Expanded = true;
axRadialMenu1.PicturesPath = "C:\\Program Files\\Exontrol\\ExRadialMenu\\Sample\\Images";
axRadialMenu1.set_HTMLPicture("arrow","arrow.png");
axRadialMenu1.SubItemsBackColor = Color.FromArgb(190,190,190);
axRadialMenu1.ShadowColor = axRadialMenu1.SubItemsBackColor;
axRadialMenu1.set_RadialLineColor(EXRADIALMENULib.RadialLineEnum.exRadialParentBorder,axRadialMenu1.SubItemsBackColor);
axRadialMenu1.set_RadialLineColor(EXRADIALMENULib.RadialLineEnum.exRadialItemsGridLines,-1);
EXRADIALMENULib.Items var_Items = axRadialMenu1.Items;
	var_Items.Add("Foreground-Color","color_line.png",null).Items.ToString = "Foreground";
	var_Items.Add("Background-Color","color_fill.png",null).Items.ToString = "Background";
	var_Items.Add("Font","format_font_size_less.png",null).Items.ToString = "Font";
	var_Items.Add("Undo","edit_undo.png",null).Items.ToString = "Undo";
	var_Items.Add("Redo","edit_redo.png",null).Items.ToString = "Redo";
	var_Items.Add("Copy","edit_copy.png",null).Items.ToString = "Copy";
	var_Items.Add("List","fileview_text.png",null).Items.ToString = "List";
	var_Items.Add("Tag","checkmark_korganizer.png",null).Items.ToString = "Tag";
axRadialMenu1.EndUpdate();

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Item,com_Items,com_Items1;
	anytype var_Item,var_Items,var_Items1;
	;

	super();

	exradialmenu1.BeginUpdate();
	exradialmenu1.Expanded(true);
	exradialmenu1.PicturesPath("C:\\Program Files\\Exontrol\\ExRadialMenu\\Sample\\Images");
	exradialmenu1.HTMLPicture("arrow","arrow.png");
	exradialmenu1.SubItemsBackColor(WinApi::RGB2int(190,190,190));
	exradialmenu1.ShadowColor(exradialmenu1.SubItemsBackColor());
	exradialmenu1.RadialLineColor(6/*exRadialParentBorder*/,exradialmenu1.SubItemsBackColor());
	exradialmenu1.RadialLineColor(5/*exRadialItemsGridLines*/,-1);
	var_Items = exradialmenu1.Items(); com_Items = var_Items;
		var_Item = COM::createFromObject(com_Items.Add("Foreground-Color","color_line.png")); com_Item = var_Item;
		var_Items1 = COM::createFromObject(com_Item).Items(); com_Items1 = var_Items1;
		com_Items1.ToString("Foreground");
		var_Item = COM::createFromObject(com_Items.Add("Background-Color","color_fill.png")); com_Item = var_Item;
		var_Items1 = COM::createFromObject(com_Item).Items(); com_Items1 = var_Items1;
		com_Items1.ToString("Background");
		var_Item = COM::createFromObject(com_Items.Add("Font","format_font_size_less.png")); com_Item = var_Item;
		var_Items1 = COM::createFromObject(com_Item).Items(); com_Items1 = var_Items1;
		com_Items1.ToString("Font");
		var_Item = COM::createFromObject(com_Items.Add("Undo","edit_undo.png")); com_Item = var_Item;
		var_Items1 = COM::createFromObject(com_Item).Items(); com_Items1 = var_Items1;
		com_Items1.ToString("Undo");
		var_Item = COM::createFromObject(com_Items.Add("Redo","edit_redo.png")); com_Item = var_Item;
		var_Items1 = COM::createFromObject(com_Item).Items(); com_Items1 = var_Items1;
		com_Items1.ToString("Redo");
		var_Item = COM::createFromObject(com_Items.Add("Copy","edit_copy.png")); com_Item = var_Item;
		var_Items1 = COM::createFromObject(com_Item).Items(); com_Items1 = var_Items1;
		com_Items1.ToString("Copy");
		var_Item = COM::createFromObject(com_Items.Add("List","fileview_text.png")); com_Item = var_Item;
		var_Items1 = COM::createFromObject(com_Item).Items(); com_Items1 = var_Items1;
		com_Items1.ToString("List");
		var_Item = COM::createFromObject(com_Items.Add("Tag","checkmark_korganizer.png")); com_Item = var_Item;
		var_Items1 = COM::createFromObject(com_Item).Items(); com_Items1 = var_Items1;
		com_Items1.ToString("Tag");
	exradialmenu1.EndUpdate();
}

Delphi 8 (.NET only)

with AxRadialMenu1 do
begin
	BeginUpdate();
	Expanded := True;
	PicturesPath := 'C:\Program Files\Exontrol\ExRadialMenu\Sample\Images';
	set_HTMLPicture('arrow','arrow.png');
	SubItemsBackColor := Color.FromArgb(190,190,190);
	ShadowColor := SubItemsBackColor;
	set_RadialLineColor(EXRADIALMENULib.RadialLineEnum.exRadialParentBorder,SubItemsBackColor);
	set_RadialLineColor(EXRADIALMENULib.RadialLineEnum.exRadialItemsGridLines,$ffffffff);
	with Items do
	begin
		Add('Foreground-Color','color_line.png',Nil).Items.ToString := 'Foreground';
		Add('Background-Color','color_fill.png',Nil).Items.ToString := 'Background';
		Add('Font','format_font_size_less.png',Nil).Items.ToString := 'Font';
		Add('Undo','edit_undo.png',Nil).Items.ToString := 'Undo';
		Add('Redo','edit_redo.png',Nil).Items.ToString := 'Redo';
		Add('Copy','edit_copy.png',Nil).Items.ToString := 'Copy';
		Add('List','fileview_text.png',Nil).Items.ToString := 'List';
		Add('Tag','checkmark_korganizer.png',Nil).Items.ToString := 'Tag';
	end;
	EndUpdate();
end

Delphi (standard)

with RadialMenu1 do
begin
	BeginUpdate();
	Expanded := True;
	PicturesPath := 'C:\Program Files\Exontrol\ExRadialMenu\Sample\Images';
	HTMLPicture['arrow'] := 'arrow.png';
	SubItemsBackColor := RGB(190,190,190);
	ShadowColor := SubItemsBackColor;
	RadialLineColor[EXRADIALMENULib_TLB.exRadialParentBorder] := SubItemsBackColor;
	RadialLineColor[EXRADIALMENULib_TLB.exRadialItemsGridLines] := $ffffffff;
	with Items do
	begin
		Add('Foreground-Color','color_line.png',Null).Items.ToString := 'Foreground';
		Add('Background-Color','color_fill.png',Null).Items.ToString := 'Background';
		Add('Font','format_font_size_less.png',Null).Items.ToString := 'Font';
		Add('Undo','edit_undo.png',Null).Items.ToString := 'Undo';
		Add('Redo','edit_redo.png',Null).Items.ToString := 'Redo';
		Add('Copy','edit_copy.png',Null).Items.ToString := 'Copy';
		Add('List','fileview_text.png',Null).Items.ToString := 'List';
		Add('Tag','checkmark_korganizer.png',Null).Items.ToString := 'Tag';
	end;
	EndUpdate();
end

VFP

with thisform.RadialMenu1
	.BeginUpdate
	.Expanded = .T.
	.PicturesPath = "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
	.Object.HTMLPicture("arrow") = "arrow.png"
	.SubItemsBackColor = RGB(190,190,190)
	.ShadowColor = .SubItemsBackColor
	.Object.RadialLineColor(6) = .SubItemsBackColor
	.Object.RadialLineColor(5) = -1
	with .Items
		.Add("Foreground-Color","color_line.png").Items.ToString = "Foreground"
		.Add("Background-Color","color_fill.png").Items.ToString = "Background"
		.Add("Font","format_font_size_less.png").Items.ToString = "Font"
		.Add("Undo","edit_undo.png").Items.ToString = "Undo"
		.Add("Redo","edit_redo.png").Items.ToString = "Redo"
		.Add("Copy","edit_copy.png").Items.ToString = "Copy"
		.Add("List","fileview_text.png").Items.ToString = "List"
		.Add("Tag","checkmark_korganizer.png").Items.ToString = "Tag"
	endwith
	.EndUpdate
endwith

dBASE Plus

local oRadialMenu,var_Items,var_Items1,var_Items2,var_Items3,var_Items4,var_Items5,var_Items6,var_Items7,var_Items8

oRadialMenu = form.EXRADIALMENUACTIVEXCONTROL1.nativeObject
oRadialMenu.BeginUpdate()
oRadialMenu.Expanded = true
oRadialMenu.PicturesPath = "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
oRadialMenu.Template = [HTMLPicture("arrow") = "arrow.png"] // oRadialMenu.HTMLPicture("arrow") = "arrow.png"
oRadialMenu.SubItemsBackColor = 0xbebebe
oRadialMenu.ShadowColor = oRadialMenu.SubItemsBackColor
oRadialMenu.Template = [RadialLineColor(6) = SubItemsBackColor] // oRadialMenu.RadialLineColor(6) = oRadialMenu.SubItemsBackColor
oRadialMenu.Template = [RadialLineColor(5) = -1] // oRadialMenu.RadialLineColor(5) = -1
var_Items = oRadialMenu.Items
	// var_Items.Add("Foreground-Color","color_line.png").Items.ToString = "Foreground"
	var_Items1 = var_Items.Add("Foreground-Color","color_line.png").Items
	with (oRadialMenu)
		TemplateDef = [dim var_Items1]
		TemplateDef = var_Items1
		Template = [var_Items1.ToString = "Foreground"]
	endwith
	// var_Items.Add("Background-Color","color_fill.png").Items.ToString = "Background"
	var_Items2 = var_Items.Add("Background-Color","color_fill.png").Items
	with (oRadialMenu)
		TemplateDef = [dim var_Items2]
		TemplateDef = var_Items2
		Template = [var_Items2.ToString = "Background"]
	endwith
	// var_Items.Add("Font","format_font_size_less.png").Items.ToString = "Font"
	var_Items3 = var_Items.Add("Font","format_font_size_less.png").Items
	with (oRadialMenu)
		TemplateDef = [dim var_Items3]
		TemplateDef = var_Items3
		Template = [var_Items3.ToString = "Font"]
	endwith
	// var_Items.Add("Undo","edit_undo.png").Items.ToString = "Undo"
	var_Items4 = var_Items.Add("Undo","edit_undo.png").Items
	with (oRadialMenu)
		TemplateDef = [dim var_Items4]
		TemplateDef = var_Items4
		Template = [var_Items4.ToString = "Undo"]
	endwith
	// var_Items.Add("Redo","edit_redo.png").Items.ToString = "Redo"
	var_Items5 = var_Items.Add("Redo","edit_redo.png").Items
	with (oRadialMenu)
		TemplateDef = [dim var_Items5]
		TemplateDef = var_Items5
		Template = [var_Items5.ToString = "Redo"]
	endwith
	// var_Items.Add("Copy","edit_copy.png").Items.ToString = "Copy"
	var_Items6 = var_Items.Add("Copy","edit_copy.png").Items
	with (oRadialMenu)
		TemplateDef = [dim var_Items6]
		TemplateDef = var_Items6
		Template = [var_Items6.ToString = "Copy"]
	endwith
	// var_Items.Add("List","fileview_text.png").Items.ToString = "List"
	var_Items7 = var_Items.Add("List","fileview_text.png").Items
	with (oRadialMenu)
		TemplateDef = [dim var_Items7]
		TemplateDef = var_Items7
		Template = [var_Items7.ToString = "List"]
	endwith
	// var_Items.Add("Tag","checkmark_korganizer.png").Items.ToString = "Tag"
	var_Items8 = var_Items.Add("Tag","checkmark_korganizer.png").Items
	with (oRadialMenu)
		TemplateDef = [dim var_Items8]
		TemplateDef = var_Items8
		Template = [var_Items8.ToString = "Tag"]
	endwith
oRadialMenu.EndUpdate()

XBasic (Alpha Five)

Dim oRadialMenu as P
Dim var_Items as P
Dim var_Items1 as local
Dim var_Items2 as local
Dim var_Items3 as local
Dim var_Items4 as local
Dim var_Items5 as local
Dim var_Items6 as local
Dim var_Items7 as local
Dim var_Items8 as local

oRadialMenu = topparent:CONTROL_ACTIVEX1.activex
oRadialMenu.BeginUpdate()
oRadialMenu.Expanded = .t.
oRadialMenu.PicturesPath = "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
oRadialMenu.Template = "HTMLPicture(`arrow`) = `arrow.png`" // oRadialMenu.HTMLPicture("arrow") = "arrow.png"
oRadialMenu.SubItemsBackColor = 12500670
oRadialMenu.ShadowColor = oRadialMenu.SubItemsBackColor
oRadialMenu.Template = "RadialLineColor(6) = SubItemsBackColor" // oRadialMenu.RadialLineColor(6) = oRadialMenu.SubItemsBackColor
oRadialMenu.Template = "RadialLineColor(5) = -1" // oRadialMenu.RadialLineColor(5) = -1
var_Items = oRadialMenu.Items
	' var_Items.Add("Foreground-Color","color_line.png").Items.ToString = "Foreground"
	var_Items1 = var_Items.Add("Foreground-Color","color_line.png").Items
	oRadialMenu.TemplateDef = "dim var_Items1"
	oRadialMenu.TemplateDef = var_Items1
	oRadialMenu.Template = "var_Items1.ToString = `Foreground`"

	' var_Items.Add("Background-Color","color_fill.png").Items.ToString = "Background"
	var_Items2 = var_Items.Add("Background-Color","color_fill.png").Items
	oRadialMenu.TemplateDef = "dim var_Items2"
	oRadialMenu.TemplateDef = var_Items2
	oRadialMenu.Template = "var_Items2.ToString = `Background`"

	' var_Items.Add("Font","format_font_size_less.png").Items.ToString = "Font"
	var_Items3 = var_Items.Add("Font","format_font_size_less.png").Items
	oRadialMenu.TemplateDef = "dim var_Items3"
	oRadialMenu.TemplateDef = var_Items3
	oRadialMenu.Template = "var_Items3.ToString = `Font`"

	' var_Items.Add("Undo","edit_undo.png").Items.ToString = "Undo"
	var_Items4 = var_Items.Add("Undo","edit_undo.png").Items
	oRadialMenu.TemplateDef = "dim var_Items4"
	oRadialMenu.TemplateDef = var_Items4
	oRadialMenu.Template = "var_Items4.ToString = `Undo`"

	' var_Items.Add("Redo","edit_redo.png").Items.ToString = "Redo"
	var_Items5 = var_Items.Add("Redo","edit_redo.png").Items
	oRadialMenu.TemplateDef = "dim var_Items5"
	oRadialMenu.TemplateDef = var_Items5
	oRadialMenu.Template = "var_Items5.ToString = `Redo`"

	' var_Items.Add("Copy","edit_copy.png").Items.ToString = "Copy"
	var_Items6 = var_Items.Add("Copy","edit_copy.png").Items
	oRadialMenu.TemplateDef = "dim var_Items6"
	oRadialMenu.TemplateDef = var_Items6
	oRadialMenu.Template = "var_Items6.ToString = `Copy`"

	' var_Items.Add("List","fileview_text.png").Items.ToString = "List"
	var_Items7 = var_Items.Add("List","fileview_text.png").Items
	oRadialMenu.TemplateDef = "dim var_Items7"
	oRadialMenu.TemplateDef = var_Items7
	oRadialMenu.Template = "var_Items7.ToString = `List`"

	' var_Items.Add("Tag","checkmark_korganizer.png").Items.ToString = "Tag"
	var_Items8 = var_Items.Add("Tag","checkmark_korganizer.png").Items
	oRadialMenu.TemplateDef = "dim var_Items8"
	oRadialMenu.TemplateDef = var_Items8
	oRadialMenu.Template = "var_Items8.ToString = `Tag`"

oRadialMenu.EndUpdate()

Visual Objects

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Expanded := true
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
oDCOCX_Exontrol1:[HTMLPicture,"arrow"] := "arrow.png"
oDCOCX_Exontrol1:SubItemsBackColor := RGB(190,190,190)
oDCOCX_Exontrol1:ShadowColor := oDCOCX_Exontrol1:SubItemsBackColor
oDCOCX_Exontrol1:[RadialLineColor,exRadialParentBorder] := oDCOCX_Exontrol1:SubItemsBackColor
oDCOCX_Exontrol1:[RadialLineColor,exRadialItemsGridLines] := -1
var_Items := oDCOCX_Exontrol1:Items
	var_Items:Add("Foreground-Color","color_line.png",nil):Items:ToString := "Foreground"
	var_Items:Add("Background-Color","color_fill.png",nil):Items:ToString := "Background"
	var_Items:Add("Font","format_font_size_less.png",nil):Items:ToString := "Font"
	var_Items:Add("Undo","edit_undo.png",nil):Items:ToString := "Undo"
	var_Items:Add("Redo","edit_redo.png",nil):Items:ToString := "Redo"
	var_Items:Add("Copy","edit_copy.png",nil):Items:ToString := "Copy"
	var_Items:Add("List","fileview_text.png",nil):Items:ToString := "List"
	var_Items:Add("Tag","checkmark_korganizer.png",nil):Items:ToString := "Tag"
oDCOCX_Exontrol1:EndUpdate()

PowerBuilder

OleObject oRadialMenu,var_Items

oRadialMenu = ole_1.Object
oRadialMenu.BeginUpdate()
oRadialMenu.Expanded = true
oRadialMenu.PicturesPath = "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
oRadialMenu.HTMLPicture("arrow","arrow.png")
oRadialMenu.SubItemsBackColor = RGB(190,190,190)
oRadialMenu.ShadowColor = oRadialMenu.SubItemsBackColor
oRadialMenu.RadialLineColor(6,oRadialMenu.SubItemsBackColor)
oRadialMenu.RadialLineColor(5,-1)
var_Items = oRadialMenu.Items
	var_Items.Add("Foreground-Color","color_line.png").Items.ToString = "Foreground"
	var_Items.Add("Background-Color","color_fill.png").Items.ToString = "Background"
	var_Items.Add("Font","format_font_size_less.png").Items.ToString = "Font"
	var_Items.Add("Undo","edit_undo.png").Items.ToString = "Undo"
	var_Items.Add("Redo","edit_redo.png").Items.ToString = "Redo"
	var_Items.Add("Copy","edit_copy.png").Items.ToString = "Copy"
	var_Items.Add("List","fileview_text.png").Items.ToString = "List"
	var_Items.Add("Tag","checkmark_korganizer.png").Items.ToString = "Tag"
oRadialMenu.EndUpdate()

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Send ComBeginUpdate
	Set ComExpanded to True
	Set ComPicturesPath to "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
	Set ComHTMLPicture "arrow" to "arrow.png"
	Set ComSubItemsBackColor to (RGB(190,190,190))
	Set ComShadowColor to (ComSubItemsBackColor(Self))
	Set ComRadialLineColor OLEexRadialParentBorder to (ComSubItemsBackColor(Self))
	Set ComRadialLineColor OLEexRadialItemsGridLines to -1
	Variant voItems
	Get ComItems to voItems
	Handle hoItems
	Get Create (RefClass(cComItems)) to hoItems
	Set pvComObject of hoItems to voItems
		Variant voItem
		Get ComAdd of hoItems "Foreground-Color" "color_line.png" Nothing to voItem
		Handle hoItem
		Get Create (RefClass(cComItem)) to hoItem
		Set pvComObject of hoItem to voItem
			Variant voItems1
			Get ComItems of hoItem to voItems1
			Handle hoItems1
			Get Create (RefClass(cComItems)) to hoItems1
			Set pvComObject of hoItems1 to voItems1
				Set ComToString of hoItems1 to "Foreground"
			Send Destroy to hoItems1
		Send Destroy to hoItem
		Variant voItem1
		Get ComAdd of hoItems "Background-Color" "color_fill.png" Nothing to voItem1
		Handle hoItem1
		Get Create (RefClass(cComItem)) to hoItem1
		Set pvComObject of hoItem1 to voItem1
			Variant voItems2
			Get ComItems of hoItem1 to voItems2
			Handle hoItems2
			Get Create (RefClass(cComItems)) to hoItems2
			Set pvComObject of hoItems2 to voItems2
				Set ComToString of hoItems2 to "Background"
			Send Destroy to hoItems2
		Send Destroy to hoItem1
		Variant voItem2
		Get ComAdd of hoItems "Font" "format_font_size_less.png" Nothing to voItem2
		Handle hoItem2
		Get Create (RefClass(cComItem)) to hoItem2
		Set pvComObject of hoItem2 to voItem2
			Variant voItems3
			Get ComItems of hoItem2 to voItems3
			Handle hoItems3
			Get Create (RefClass(cComItems)) to hoItems3
			Set pvComObject of hoItems3 to voItems3
				Set ComToString of hoItems3 to "Font"
			Send Destroy to hoItems3
		Send Destroy to hoItem2
		Variant voItem3
		Get ComAdd of hoItems "Undo" "edit_undo.png" Nothing to voItem3
		Handle hoItem3
		Get Create (RefClass(cComItem)) to hoItem3
		Set pvComObject of hoItem3 to voItem3
			Variant voItems4
			Get ComItems of hoItem3 to voItems4
			Handle hoItems4
			Get Create (RefClass(cComItems)) to hoItems4
			Set pvComObject of hoItems4 to voItems4
				Set ComToString of hoItems4 to "Undo"
			Send Destroy to hoItems4
		Send Destroy to hoItem3
		Variant voItem4
		Get ComAdd of hoItems "Redo" "edit_redo.png" Nothing to voItem4
		Handle hoItem4
		Get Create (RefClass(cComItem)) to hoItem4
		Set pvComObject of hoItem4 to voItem4
			Variant voItems5
			Get ComItems of hoItem4 to voItems5
			Handle hoItems5
			Get Create (RefClass(cComItems)) to hoItems5
			Set pvComObject of hoItems5 to voItems5
				Set ComToString of hoItems5 to "Redo"
			Send Destroy to hoItems5
		Send Destroy to hoItem4
		Variant voItem5
		Get ComAdd of hoItems "Copy" "edit_copy.png" Nothing to voItem5
		Handle hoItem5
		Get Create (RefClass(cComItem)) to hoItem5
		Set pvComObject of hoItem5 to voItem5
			Variant voItems6
			Get ComItems of hoItem5 to voItems6
			Handle hoItems6
			Get Create (RefClass(cComItems)) to hoItems6
			Set pvComObject of hoItems6 to voItems6
				Set ComToString of hoItems6 to "Copy"
			Send Destroy to hoItems6
		Send Destroy to hoItem5
		Variant voItem6
		Get ComAdd of hoItems "List" "fileview_text.png" Nothing to voItem6
		Handle hoItem6
		Get Create (RefClass(cComItem)) to hoItem6
		Set pvComObject of hoItem6 to voItem6
			Variant voItems7
			Get ComItems of hoItem6 to voItems7
			Handle hoItems7
			Get Create (RefClass(cComItems)) to hoItems7
			Set pvComObject of hoItems7 to voItems7
				Set ComToString of hoItems7 to "List"
			Send Destroy to hoItems7
		Send Destroy to hoItem6
		Variant voItem7
		Get ComAdd of hoItems "Tag" "checkmark_korganizer.png" Nothing to voItem7
		Handle hoItem7
		Get Create (RefClass(cComItem)) to hoItem7
		Set pvComObject of hoItem7 to voItem7
			Variant voItems8
			Get ComItems of hoItem7 to voItems8
			Handle hoItems8
			Get Create (RefClass(cComItems)) to hoItems8
			Set pvComObject of hoItems8 to voItems8
				Set ComToString of hoItems8 to "Tag"
			Send Destroy to hoItems8
		Send Destroy to hoItem7
	Send Destroy to hoItems
	Send ComEndUpdate
End_Procedure

XBase++

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

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

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

	oRadialMenu := XbpActiveXControl():new( oForm:drawingArea )
	oRadialMenu:CLSID  := "Exontrol.RadialMenu.1" /*{1604BDE1-D48F-4D3F-B51B-49C0CD74236C}*/
	oRadialMenu:create(,, {10,60},{610,370} )

		oRadialMenu:BeginUpdate()
		oRadialMenu:Expanded := .T.
		oRadialMenu:PicturesPath := "C:\Program Files\Exontrol\ExRadialMenu\Sample\Images"
		oRadialMenu:SetProperty("HTMLPicture","arrow","arrow.png")
		oRadialMenu:SetProperty("SubItemsBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
		oRadialMenu:SetProperty("ShadowColor",oRadialMenu:SubItemsBackColor())
		oRadialMenu:SetProperty("RadialLineColor",6/*exRadialParentBorder*/,oRadialMenu:SubItemsBackColor())
		oRadialMenu:SetProperty("RadialLineColor",5/*exRadialItemsGridLines*/,-1)
		oItems := oRadialMenu:Items()
			oItems:Add("Foreground-Color","color_line.png"):Items():ToString := "Foreground"
			oItems:Add("Background-Color","color_fill.png"):Items():ToString := "Background"
			oItems:Add("Font","format_font_size_less.png"):Items():ToString := "Font"
			oItems:Add("Undo","edit_undo.png"):Items():ToString := "Undo"
			oItems:Add("Redo","edit_redo.png"):Items():ToString := "Redo"
			oItems:Add("Copy","edit_copy.png"):Items():ToString := "Copy"
			oItems:Add("List","fileview_text.png"):Items():ToString := "List"
			oItems:Add("Tag","checkmark_korganizer.png"):Items():ToString := "Tag"
		oRadialMenu:EndUpdate()

	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.