Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Tree View Control "Intellisense" 2

Status
Not open for further replies.

Cleis

Technical User
Jun 4, 2000
197
US
Hi all!

I'm very curious about this. When I install this component (Access XP) and make all of the necessary additions in the references, should I have the IntelliSense in the VB environment? I've also had a VERY hard time figuring out if all of my references are correct! I can't seem to find any solid documentation on this subject. Also w/o the IntelliSense it's been very hard trying to get all of the parms right? What concerns me is when I'm done with the App and I go to the Package and Deployment Wizard and this is going to blow up.

To be frank, I've never used Active X controls before and this is a new venture for me.

Any help or clarification would be helpful and appreciated!



Regards


Rich
 
No intellisense.

I rely on good books since the online documentation isn't very good.

A good way to learn the controls is to use them in the full VB IDE before attempting to use them in Access.
VBSlammer
redinvader3walking.gif
 
Intellisense should be working for your ActiveX controls. After you drop a control on a form or instantiate it Intellisense will prompt you if you use the dot (.) following the control name. There used to be a way in the Tools/Options to start and stop Intellisense but I am unable to find that in Access 2000. -------------------------------------
scking@arinc.com
Try to resolve problems independently
Then seek help among peers or experts
But TEST recommended solutions
-------------------------------------
 
In Access, the intellisense offered in the IDE is for the OLE container that the ActiveX control resides in, and doesn't give all the methods and properties specific to the ActiveX control.
Code:
  With Treeview1
    .About
    .Application
    .BorderColor
    .BorderStyle
    .BorderWidth
    .Cancel
    .Class
    .Controls
    .ControlSource
    .ControlTipText
    .ControlType
    .Custom
    .Default
    .DisplayWhen
    .Enabled
    .EventProcPrefix
    .Height
    .HelpContextId
    .InSelection
    .IsVisible
    .Left
    .Locked
    .LpOleObject
    .Name
    .Object
    .ObjectPalette
    .ObjectVerbs
    .ObjectVerbsCount
    .OldBorderStyle
    .OldValue
    .OLEClass
    .OnEnter
    .OnExit
    .OnGotFocus
    .OnLostFocus
    .OnUpdated
    .Parent
    .Properties
    .Requery
    .Section
    .SetFocus
    .SizeToFit
    .SpecialEffect
    .TabIndex
    .TabStop
    .Tag
    .Top
    .Value
    .Verb
    .Visible
    .Width
  End With
You can, however, use an explicit declaration of the ActiveX control type to expose its methods and properties, thus enabling the intellisense feature.

For example, using a Treeview named Treeview1 in an Access form:
Code:
  ' Explicit varialbe declaration
  Dim tvw As MSComctlLib.TreeView

  ' Assign the ActiveX Object
  Set tvw = Treeview1.Object

  ' Intellisense now available
  With tvw
    .Appearance
    .BorderStyle
    .Checkboxes
    .DropHighlight
    .Enabled
    .Font
    .FullRowSelect
    .GetVisibleCount
    .HideSelection
    .HitTest
    .HotTracking
    .hWnd
    .ImageList
    .Indentation
    .LabelEdit
    .LineStyle
    .MouseIcon
    .MousePointer
    .Nodes
    .OLEDrag
    .OLEDragMode
    .OLEDropMode
    .PathSeparator
    .Refresh
    .Scroll
    .SelectedItem
    .SingleSel
    .Sorted
    .StartLabelEdit
    .Style
  End With
Also note, the Access property sheet only shows the events for the container object, i.e. OnEnter(), OnExit(), etc.

The actual events for the ActiveX control must be accessed in the IDE using the procedure combobox. VBSlammer
redinvader3walking.gif
 
Hey VBSlammer!

YOur suggestion worked! How do I do the same for Nodes? I'm still not getting the intellesense for this.

Option Explicit

' Explicit varialbe declaration
Dim tvw As MSComctlLib.TreeView
Dim nodX As MSComctlLib.Nodes


' Assign the ActiveX Object
Set tvw = TreeView1.Object

Set nodX = TreeView1.Nodes.Add(, , "R", "Main Menu", 1)

When I get to the keyword .Nodes I'm not getting the combobox select "Add" nor am I seeing the parms for Add. This has really got my "goat" so to speak.

Thanks for your advice to this point! It has been helpful!!


Regards!

Rich
 
When you used 'Treeview1' in your code you defeated the purpose of declaring the 'tvw' variable:
Code:
 ' Assign the ActiveX Object
  Set tvw = TreeView1.Object
  
  Set nodX = TreeView1.Nodes.Add(, , "R", "Main Menu", 1)

It should have been:
Code:
  Set nodX = tvw.Nodes.Add(, , "R", "Main Menu", 1)
VBSlammer
redinvader3walking.gif

Unemployed in Houston, Texas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top