| Article | 70000377 |
| Type | Bug |
| Product | Engine |
| Version | 7003 |
| Date Added | 3/30/2015 |
| Fixed | (4/1/2015) |
| Submitted by | Giovanni Sava |
Summary
Is it possible to disable or access the CommandLine from Wrapper ActiveX ? I need to disable the command's popo-up menu like using EnablePopupForm property of vdCommandLine.
Solution
In version 7004, by default is disabled. You need to enable it by code. Using the Wrapper you need to add the vdProControl.TLB in your project references. In Delphi you need to use a code like:
In the "Uses" section add : vdrawI5_tlb, VdProControl_TLB, Dialogs, StdCtrls, AxCtrls, OleCtrls and VDrawLib5_TLB ..... procedure TForm1.FormCreate(Sender: TObject); begin vdraw1.DisplayFrames:=63; vdraw1.EnableAutoGripOn:=true; vdraw1.StatusBar:=true; vdraw1.StatusBarMenu:=true; vdraw1.StatusBarPaper:=true; end; procedure TForm1.Button1Click(Sender: TObject); var vdpro_ctl : VdProControl_TLB._DVdraw; begin vdpro_ctl := vdraw1.WrapperObject as VdProControl_TLB._DVdraw; //Get the VDProControl vdpro_ctl.EnablePopupForm:=true; // Enable the popup command list vdpro_ctl.PopupFormWidth:=505; // Set the width // Color $AARRGGBB where AA is Alpha (always use FF), RR is for Red, GG for Green and BB for blue vdpro_ctl.PopupBackColor:= $ff00ff00 // Green Color vdpro_ctl.PopupFormShowIcons:=true; // Use the icons end;In VB6:
Private Sub Command9_Click()
Dim proctl As VdProControl.VdProControl
Set proctl = VDraw1.WrapperObject ' Get the VDProControl
proctl.EnablePopupForm = True ' Enable the popup command list
proctl.PopupFormWidth = 550 ' Set the width
proctl.PopupFormShowIcons = False ' Don't use the icons
'Color &HAARRGGBB where AA is Alpha (always use FF=255), RR is for Red, GG for Green and BB for blue
proctl.PopuphighlightColor = &HFF00FFFF
proctl.PopupBackColor = &HFFFF0000
proctl.MaxNumberOfCommandsShown = 23 ' number of commands to show
proctl.ShowPopupFormPerigram = False ' do not display the perigram
proctl.SetPopupFormFont "Lucida Console", 15, 1 ' alter the font
End Sub
