Hi
Having loads of fun trying to get this to work. I can add a tree to an ultraexplorerbar in the visual designer and it all looks OK. I actually need to mimic a menu system with groups as the top level items and then an ultratree under each group.
Unfortunately it all seems to work OK, but I never get any nodes to display. Can someone tell me what I need to do to the following code to make it work. Basically I have crated a method in an inhertied object of the exporerbar which I call passing a dataset.
DEF VAR iCount AS INT NO-UNDO.
FOR EACH eMenu WHERE
eMenu.TopLevel = TRUE
BY eMenu.MenuOrder:
oGroup = NEW Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarGroup().
oTree = NEW OSL.OSLMenuTree().
oContainer = NEW Infragistics.Win.UltraWinExplorerBar.UltraExplorerBarContainerControl().
oRoot = NEW Infragistics.Win.UltraWinTree.UltraTreeNode().
oContainer:Controls:Add(oTree).
oContainer:Name = "Container" + STRING(iCount).
oTree:Dock = System.Windows.Forms.DockStyle:Fill.
oTree:ImageTransparentColor = System.Drawing.Color:Transparent.
oTree:NodeConnectorColor = System.Drawing.SystemColors:ControlDark.
oTree:Name = "Tree" + STRING(iCount).
oRoot:Key = "ROOT".
oRoot:Text = "ROOT".
oTree:Nodes:Add(oRoot).
oExplorerBar:Controls:Add(oContainer).
oGroup:Key = "GROUP" + STRING(iCount).
oGroup:Text = eMenu.ItemName.
oGroup:Settings:Style = Infragistics.Win.UltraWinExplorerBar.GroupStyle:ControlContainer.
oGroup:Container = oContainer.
oContainer:Dock = System.Windows.Forms.DockStyle:Fill.
THIS-OBJECT:Groups:Add(oGroup).
iCount = iCount + 1.
END.
Anyone any idea what I'm doing wrong. I'm reasonably new to all this. I was hoping to get round the position stuff and size by making it all dock fully. I clealy need somethng else or maybe the order of things need to change. I did create an example in the visual designer and I worked form that. Unfortunately the VD was doing all this during initialisation and my method runs from a form and is post init.
Thanks
Darren
Sorted it. It must have been late...
Hi Darren,
How did you get the doubleclick to work?
I am trying to implement http://www.infragistics.com/community/forums/t/72064.aspx but ultraTree:UIElement:LastElementEntered never returns a valid object.
-peter