Yes, no problem.
I want do Drag&Drop texts to multiviewlayouts, consisting of more than one view. They are addressed by the index with this command:
ClientControl.Instance.CallOnUiThread(() => EnvironmentManager.Instance.SendMessage(
new VideoOS.Platform.Messaging.Message(MessageId.SmartClient.SetSelectedViewItemCommand,
new SetSelectedViewItemData()
{
LayoutIndex = output - 1,
MoveCommand = "Index"
})));
For the drag&drop I created an imageview with a d&d sensitive button in a background plugin. (A modified “Activeelementsoverlay”)
This background plugin informs my mainplugin about the dropped text, the view(FQID) and (doesn’t at the moment, but should do) about the index, on which the text was dropped to the button. This works nice with the one view layout (in this case the viewid is sufficent) but not with a multiview, here I would need the index additionally.
So I tried different ways to get this index. One is to subscribe to the SelectedViewItemChangedIndication message, as shown in the first posting.
Then I tried to get the index, but always got “-1” as result. (as described above)
Now I tried to get the objectIDs of the child views, (e.g. 4 in a quadrant) and to compare it with a reference , to see which one has changed. So I could get a kind of index.
In this routine I get these indexes and send them to my debugger by UDP.
List children = button_ViewList_item[zeiger * 2 - 1].GetChildren();
foreach (Item citem in children)
SendUdp(9999, m\_sRemoteIp, IRemotePort, Encoding.ASCII.GetBytes("BD: Children: " + citem.FQID.ObjectId.ToString()));
Principally it works fine, the problem is, that these child IDs only change, when the image is changed or released a all. I would need a change, if the view is selected by the user.(blue frame) So he would have to select a view and afterwards he can drag the text to the button on this selected view. Much better would be to get the index, when the text is dropped on the button, but I don’t think, that this is possible.
So far, I hope, it is a little bit clearer, what I need.
Have a nice weekend and best regards
Tom