Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Task Panel
  New Posts New Posts RSS Feed - Item Index Property
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Item Index Property

 Post Reply Post Reply
Author
Message
ManSys View Drop Down
Newbie
Newbie


Joined: 02 February 2010
Location: United Kingdom
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote ManSys Quote  Post ReplyReply Direct Link To This Post Topic: Item Index Property
    Posted: 21 January 2012 at 7:12pm
We are using the Task Panel as a menu, separating the menu groups into taskpanel groups.
 
We're letting the user drag items around within the groups but not across groups.  However, we want to be able to save/load the positions of the menu items (taskpanelgroupitems).
 
We've looked at the ItemDrop event but it doesn't seem to fire at the right time. We're using this code to check out the positions, but the same item appears twice, where it was and where it is now;
Private Sub tpMain_ItemDrop(ByVal Item As XtremeTaskPanel.ITaskPanelGroupItem)
   
    Dim tpGroup As TaskPanelGroup
    Dim tpItem As TaskPanelGroupItem
   
    Set tpGroup = Item.Group
    
    For Each tpItem In tpGroup.Items
        Debug.Print tpItem.ID, tpItem.Index, tpItem.Caption
    Next
   
End Sub
Why?  How do we go about saving the positions?
-
ManSys Limited
Back to Top
Carlos Rocha View Drop Down
Groupie
Groupie


Joined: 11 February 2008
Location: Portugal
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote Carlos Rocha Quote  Post ReplyReply Direct Link To This Post Posted: 10 February 2017 at 9:44am
Still not possible with 16.3.1

The solution is:
- Store a reference to the item being dragged within BeginDrag: Set m_ItemDragged = Item
- Use xtpTaskItemAllowDragCopyWithinGroup instead of xtpTaskItemAllowDragMoveWithinGroup
- Inside ItemDrop:

Item.Group.Items.Move m_ItemDragged, Item:Index
Item.Remove
Set m_ItemDragged = Nothing
SuitePro 20.3.0
OS: Windows 10
Language: Visual Objects 2.8
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.