Type | Description | |||
Type as RadialItemsEnum | A RadialItemsEnum expression that indicates the part of the item to be changed. | |||
Byte | A BYTE expression that specifies the value of alpha / opacity channel to show the item's background color. 255 indicates opaque, 128 semi-transparent, and 0 fully transparent. |
The following screen shot shows an item with a different back color/alpha on item/sub-item portion:
The following samples show how you can change the item's back color/alpha:
VBA (MS Access, Excell...)
With RadialMenu1 .Expanded = True With .Items With .Add("item") .Caption(2) = "sub-item" .BackColor(3) = RGB(255,0,0) .BackAlpha(2) = 64 End With End With End With
VB6
With RadialMenu1 .Expanded = True With .Items With .Add("item") .Caption(exRadialSubItems) = "sub-item" .BackColor(exRadialFullItems) = RGB(255,0,0) .BackAlpha(exRadialSubItems) = 64 End With End With End With
VB.NET
With Exradialmenu1 .Expanded = True With .Items With .Add("item") .set_Caption(exontrol.EXRADIALMENULib.RadialItemsEnum.exRadialSubItems,"sub-item") .set_BackColor(exontrol.EXRADIALMENULib.RadialItemsEnum.exRadialFullItems,Color.FromArgb(255,0,0)) .set_BackAlpha(exontrol.EXRADIALMENULib.RadialItemsEnum.exRadialSubItems,64) End With End With End With
VB.NET for /COM
With AxRadialMenu1 .Expanded = True With .Items With .Add("item") .Caption(EXRADIALMENULib.RadialItemsEnum.exRadialSubItems) = "sub-item" .BackColor(EXRADIALMENULib.RadialItemsEnum.exRadialFullItems) = RGB(255,0,0) .BackAlpha(EXRADIALMENULib.RadialItemsEnum.exRadialSubItems) = 64 End With End With 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->PutExpanded(VARIANT_TRUE); EXRADIALMENULib::IItemsPtr var_Items = spRadialMenu1->GetItems(); EXRADIALMENULib::IItemPtr var_Item = var_Items->Add(L"item",vtMissing,vtMissing); var_Item->PutCaption(EXRADIALMENULib::exRadialSubItems,L"sub-item"); var_Item->PutBackColor(EXRADIALMENULib::exRadialFullItems,RGB(255,0,0)); var_Item->PutBackAlpha(EXRADIALMENULib::exRadialSubItems,64);
C++ Builder
RadialMenu1->Expanded = true; Exradialmenulib_tlb::IItemsPtr var_Items = RadialMenu1->Items; Exradialmenulib_tlb::IItemPtr var_Item = var_Items->Add(L"item",TNoParam(),TNoParam()); var_Item->set_Caption(Exradialmenulib_tlb::RadialItemsEnum::exRadialSubItems,L"sub-item"); var_Item->set_BackColor(Exradialmenulib_tlb::RadialItemsEnum::exRadialFullItems,RGB(255,0,0)); var_Item->set_BackAlpha(Exradialmenulib_tlb::RadialItemsEnum::exRadialSubItems,64);
C#
exradialmenu1.Expanded = true; exontrol.EXRADIALMENULib.Items var_Items = exradialmenu1.Items; exontrol.EXRADIALMENULib.Item var_Item = var_Items.Add("item",null,null); var_Item.set_Caption(exontrol.EXRADIALMENULib.RadialItemsEnum.exRadialSubItems,"sub-item"); var_Item.set_BackColor(exontrol.EXRADIALMENULib.RadialItemsEnum.exRadialFullItems,Color.FromArgb(255,0,0)); var_Item.set_BackAlpha(exontrol.EXRADIALMENULib.RadialItemsEnum.exRadialSubItems,64);
JScript/JavaScript
<BODY onload="Init()"> <OBJECT CLASSID="clsid:1604BDE1-D48F-4D3F-B51B-49C0CD74236C" id="RadialMenu1"></OBJECT> <SCRIPT LANGUAGE="JScript"> function Init() { RadialMenu1.Expanded = true; var var_Items = RadialMenu1.Items; var var_Item = var_Items.Add("item",null,null); var_Item.Caption(2) = "sub-item"; var_Item.BackColor(3) = 255; var_Item.BackAlpha(2) = 64; } </SCRIPT> </BODY>
VBScript
<BODY onload="Init()"> <OBJECT CLASSID="clsid:1604BDE1-D48F-4D3F-B51B-49C0CD74236C" id="RadialMenu1"></OBJECT> <SCRIPT LANGUAGE="VBScript"> Function Init() With RadialMenu1 .Expanded = True With .Items With .Add("item") .Caption(2) = "sub-item" .BackColor(3) = RGB(255,0,0) .BackAlpha(2) = 64 End With End With End With End Function </SCRIPT> </BODY>
C# for /COM
axRadialMenu1.Expanded = true; EXRADIALMENULib.Items var_Items = axRadialMenu1.Items; EXRADIALMENULib.Item var_Item = var_Items.Add("item",null,null); var_Item.set_Caption(EXRADIALMENULib.RadialItemsEnum.exRadialSubItems,"sub-item"); var_Item.set_BackColor(EXRADIALMENULib.RadialItemsEnum.exRadialFullItems,(uint)ColorTranslator.ToWin32(Color.FromArgb(255,0,0))); var_Item.set_BackAlpha(EXRADIALMENULib.RadialItemsEnum.exRadialSubItems,64);
X++ (Dynamics Ax 2009)
public void init() { COM com_Item,com_Items; anytype var_Item,var_Items; ; super(); exradialmenu1.Expanded(true); var_Items = exradialmenu1.Items(); com_Items = var_Items; var_Item = com_Items.Add("item"); com_Item = var_Item; com_Item.Caption(2/*exRadialSubItems*/,"sub-item"); com_Item.BackColor(3/*exRadialFullItems*/,WinApi::RGB2int(255,0,0)); com_Item.BackAlpha(2/*exRadialSubItems*/,64); }
Delphi 8 (.NET only)
with AxRadialMenu1 do begin Expanded := True; with Items do begin with Add('item',Nil,Nil) do begin Caption[EXRADIALMENULib.RadialItemsEnum.exRadialSubItems] := 'sub-item'; BackColor[EXRADIALMENULib.RadialItemsEnum.exRadialFullItems] := $ff; BackAlpha[EXRADIALMENULib.RadialItemsEnum.exRadialSubItems] := 64; end; end; end
Delphi (standard)
with RadialMenu1 do begin Expanded := True; with Items do begin with Add('item',Null,Null) do begin Caption[EXRADIALMENULib_TLB.exRadialSubItems] := 'sub-item'; BackColor[EXRADIALMENULib_TLB.exRadialFullItems] := $ff; BackAlpha[EXRADIALMENULib_TLB.exRadialSubItems] := 64; end; end; end
VFP
with thisform.RadialMenu1 .Expanded = .T. with .Items with .Add("item") .Caption(2) = "sub-item" .BackColor(3) = RGB(255,0,0) .BackAlpha(2) = 64 endwith endwith endwith
dBASE Plus
local oRadialMenu,var_Item,var_Items oRadialMenu = form.EXRADIALMENUACTIVEXCONTROL1.nativeObject oRadialMenu.Expanded = true var_Items = oRadialMenu.Items var_Item = var_Items.Add("item") // var_Item.Caption(2) = "sub-item" with (oRadialMenu) TemplateDef = [dim var_Item] TemplateDef = var_Item Template = [var_Item.Caption(2) = "sub-item"] endwith // var_Item.BackColor(3) = 0xff with (oRadialMenu) TemplateDef = [dim var_Item] TemplateDef = var_Item Template = [var_Item.BackColor(3) = 255] endwith // var_Item.BackAlpha(2) = 64 with (oRadialMenu) TemplateDef = [dim var_Item] TemplateDef = var_Item Template = [var_Item.BackAlpha(2) = 64] endwith
XBasic (Alpha Five)
Dim oRadialMenu as P Dim var_Item as P Dim var_Items as P oRadialMenu = topparent:CONTROL_ACTIVEX1.activex oRadialMenu.Expanded = .t. var_Items = oRadialMenu.Items var_Item = var_Items.Add("item") ' var_Item.Caption(2) = "sub-item" oRadialMenu.TemplateDef = "dim var_Item" oRadialMenu.TemplateDef = var_Item oRadialMenu.Template = "var_Item.Caption(2) = `sub-item`" ' var_Item.BackColor(3) = 255 oRadialMenu.TemplateDef = "dim var_Item" oRadialMenu.TemplateDef = var_Item oRadialMenu.Template = "var_Item.BackColor(3) = 255" ' var_Item.BackAlpha(2) = 64 oRadialMenu.TemplateDef = "dim var_Item" oRadialMenu.TemplateDef = var_Item oRadialMenu.Template = "var_Item.BackAlpha(2) = 64"
Visual Objects
local var_Item as IItem local var_Items as IItems oDCOCX_Exontrol1:Expanded := true var_Items := oDCOCX_Exontrol1:Items var_Item := var_Items:Add("item",nil,nil) var_Item:[Caption,exRadialSubItems] := "sub-item" var_Item:[BackColor,exRadialFullItems] := RGB(255,0,0) var_Item:[BackAlpha,exRadialSubItems] := 64
PowerBuilder
OleObject oRadialMenu,var_Item,var_Items oRadialMenu = ole_1.Object oRadialMenu.Expanded = true var_Items = oRadialMenu.Items var_Item = var_Items.Add("item") var_Item.Caption(2,"sub-item") var_Item.BackColor(3,RGB(255,0,0)) var_Item.BackAlpha(2,64)
Visual DataFlex
Procedure OnCreate Forward Send OnCreate Set ComExpanded to True 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 "item" Nothing Nothing to voItem Handle hoItem Get Create (RefClass(cComItem)) to hoItem Set pvComObject of hoItem to voItem Set ComCaption of hoItem OLEexRadialSubItems to "sub-item" Set ComBackColor of hoItem OLEexRadialFullItems to (RGB(255,0,0)) Set ComBackAlpha of hoItem OLEexRadialSubItems to 64 Send Destroy to hoItem Send Destroy to hoItems End_Procedure
XBase++
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oItem 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:Expanded := .T. oItems := oRadialMenu:Items() oItem := oItems:Add("item") oItem:SetProperty("Caption",2/*exRadialSubItems*/,"sub-item") oItem:SetProperty("BackColor",3/*exRadialFullItems*/,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItem:SetProperty("BackAlpha",2/*exRadialSubItems*/,64) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN