Type | Description | |||
Part as BackgroundPartEnum | A BackgroundPartEnum expression that indicates a part in the control. | |||
Color | A Color expression that indicates the background color for a specified part. The last 7 bits in the high significant byte of the color to indicates the identifier of the skin being used. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the background's part. |
The following samples remove the border for all elements:
VBA (MS Access, Excell...)
With Surface1 .Background(88) = -1 .Elements.Add "new element" End With
VB6
With Surface1 .Background(exElementBorderColor) = -1 .Elements.Add "new element" End With
VB.NET
With Exsurface1 .set_Background32(exontrol.EXSURFACELib.BackgroundPartEnum.exElementBorderColor,-1) .Elements.Add("new element") End With
VB.NET for /COM
With AxSurface1 .set_Background(EXSURFACELib.BackgroundPartEnum.exElementBorderColor,-1) .Elements.Add("new element") End With
C++
/* Copy and paste the following directives to your header file as it defines the namespace 'EXSURFACELib' for the library: 'ExSurface 1.0 Control Library' #import <ExSurface.dll> using namespace EXSURFACELib; */ EXSURFACELib::ISurfacePtr spSurface1 = GetDlgItem(IDC_SURFACE1)->GetControlUnknown(); spSurface1->PutBackground(EXSURFACELib::exElementBorderColor,-1); spSurface1->GetElements()->Add("new element",vtMissing,vtMissing);
C++ Builder
Surface1->Background[Exsurfacelib_tlb::BackgroundPartEnum::exElementBorderColor] = -1; Surface1->Elements->Add(TVariant("new element"),TNoParam(),TNoParam());
C#
exsurface1.set_Background32(exontrol.EXSURFACELib.BackgroundPartEnum.exElementBorderColor,-1); exsurface1.Elements.Add("new element",null,null);
JavaScript
<OBJECT classid="clsid:AC1DF7F4-0919-4364-8167-2F9B5155EA4B" id="Surface1"></OBJECT> <SCRIPT LANGUAGE="JScript"> Surface1.Background(88) = -1; Surface1.Elements.Add("new element",null,null); </SCRIPT>
C# for /COM
axSurface1.set_Background(EXSURFACELib.BackgroundPartEnum.exElementBorderColor,-1); axSurface1.Elements.Add("new element",null,null);
X++ (Dynamics Ax 2009)
public void init() { ; super(); exsurface1.Background(88/*exElementBorderColor*/,-1); exsurface1.Elements().Add("new element"); }
Delphi 8 (.NET only)
with AxSurface1 do begin set_Background(EXSURFACELib.BackgroundPartEnum.exElementBorderColor,$ffffffff); Elements.Add('new element',Nil,Nil); end
Delphi (standard)
with Surface1 do begin Background[EXSURFACELib_TLB.exElementBorderColor] := $ffffffff; Elements.Add('new element',Null,Null); end
VFP
with thisform.Surface1 .Object.Background(88) = -1 .Elements.Add("new element") endwith
dBASE Plus
local oSurface oSurface = form.Activex1.nativeObject oSurface.Template = [Background(88) = -1] // oSurface.Background(88) = -1 oSurface.Elements.Add("new element")
XBasic (Alpha Five)
Dim oSurface as P oSurface = topparent:CONTROL_ACTIVEX1.activex oSurface.Template = "Background(88) = -1" ' oSurface.Background(88) = -1 oSurface.Elements.Add("new element")
Visual Objects
oDCOCX_Exontrol1:[Background,exElementBorderColor] := -1 oDCOCX_Exontrol1:Elements:Add("new element",nil,nil)
PowerBuilder
OleObject oSurface oSurface = ole_1.Object oSurface.Background(88,-1) oSurface.Elements.Add("new element")
Visual DataFlex
Procedure OnCreate
Forward Send OnCreate
Set ComBackground OLEexElementBorderColor to -1
Variant voElements
Get ComElements to voElements
Handle hoElements
Get Create (RefClass(cComElements)) to hoElements
Set pvComObject of hoElements to voElements
Get ComAdd of hoElements "new element" Nothing Nothing to Nothing
Send Destroy to hoElements
End_Procedure
XBase++
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oSurface oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oSurface := XbpActiveXControl():new( oForm:drawingArea ) oSurface:CLSID := "Exontrol.Surface.1" /*{AC1DF7F4-0919-4364-8167-2F9B5155EA4B}*/ oSurface:create(,, {10,60},{610,370} ) oSurface:SetProperty("Background",88/*exElementBorderColor*/,-1) oSurface:Elements():Add("new element") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN