lawman_actual 24 Posted November 8, 2016 Can't work out why this is defeating me, but here goes. I've made a tree-dialog control, which is automatically populated based on artillery units alive in the mission. Parent headers are "Mortar", "Howitzer" and "MLRS" respectively, and under each heading is listed the group name. So...all I need to do at this point is re-obtain the name of whatever group is selected so I can process it through another part of the script. But I can't seem to find the right function to tell me the text entry of whatever path is selected for the given IDC? Entry in dialogs.hpp: class providerTree: _CT_Tree { idc = 1500; text = "" //--- ToDo: Localize; x = 1.2375; //Was 0.25 y = -0.02; w = 0.4; h = 0.18; colorPicture[] = {1,1,1,0}; colorPictureSelected[] = {1,1,1,0}; colorPictureDisabled[] = {1,1,1,0}; colorPictureRight[] = {1,1,1,0}; colorPictureRightSelected[] = {1,1,1,0}; colorPictureRightDisabled[] = {1,1,1,0}; onTreeSelChanged = "incomingData = +_this; nul = execVM ""GuiArtyChangeForm.sqf"" ; false"; }; GuiArtyChangeForm.sqf: //___________________________________________________________________________________________________ //Extract incoming Data: //Note that incomingData variable is equal to _this when selection is made (returns in format [idc,path]) //¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ _IdcAsText = format ["%1",(incomingData select 0)]; _IdcAsNumber = parseNumber _IdcAsText; _PathSelected = incomingData select 1; //systemChat (format ["%1",incomingData]); //systemChat (format ["%1",(tvText [(1500), [0,1]])]); //___________________________________________________________________________________________________ //If Modified Field is PROVIDER: //¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬ if (_IdcAsNumber == 1500) then { //If path contains more than 1 entry (is not title), proceed to extract unit name: if ((count _PathSelected) > 1) then { lastProviderArty = lbText [(incomingData select 0), _PathSelected]; }; }; I've tried using tvText, tvData, tvValue.... mostly they return completely blank, but one of them seems to return -1. Nothing i've found seems to give me back the text value of the selected field, which in this case displays as Alpha 2-2 or whatever, being a group name. Share this post Link to post Share on other sites
lawman_actual 24 Posted November 8, 2016 Problem fixed, with special thanks to Dmitry Yuri (Zeus community) I think it came down to forgetting about zero-based systems within the sub-group. (I know, stupid right) Share this post Link to post Share on other sites