I'm trying to make my Task Panel items dynamic. We're coding in Visual Dataflex.
We've adapted the code in the demo and the structure of the code is like this:
Object oReport_Control_Group is a cSigCJTaskPanelGroup Set psLabel to "Accounts KPIs" Set psImage to "Order.ico" Object oReportControlText_GroupItem is a cSigCJTaskPanelGroupItem Set psLabel to "Orders" Set psImage to "Order.ico" Procedure OnClick Handle hoClient Get Client_Id to hoClient Send Activate_SigCjReportControlDemo_Text_View of hoClient End_Procedure End_Object End_Object
Making that dynamic is a problem. You can't put the inner Object definition in a loop in VDF far as I can see. For shortcuts there's an "Add_Item" Procedure which allows me to add items dynamically, there doesn't seem to be an equivalent for Task Bars. The closest I can see is "ComAdd". That does work in that it creates a new item in the group - I've tried doing this in the "Private.Create" of the GroupItem. I do then get two items showing so potentially that could be put into a loop but the On_Click of the GroupItem is fired for both items and I can't see a way of telling which is which and defining the action for each.
VDF is not well used so I'm not sure if anyone can help but I've run out of ideas so it's worth a try.
|