Sam Jones Posted November 5, 2023 Share Posted November 5, 2023 I have an event aware point object that that has a drop down list of vendors. When a user changes the vendor name there are 2 other drop down menus that change the contents of their list based on the value of the newly selected drop down. When the user changes a vendor value in an already placed instance of the PIO, all goes according to plan. The vsoStateGetParamChng() function yields points to the vendor as having changed; I query the value, and I then change the lists in the other drop down. Is there any way to get this functionality in the default OIP dialog that comes up when selected in the mode bar. Currently, changing the vendor value in the default OIP does not tell any part of the code that the vendor parameter has changed, there seems to be no way to then change the lists in the drop downs of the default OIP. Is there a way to do that? Quote Link to comment
SamIWas Posted November 21, 2023 Share Posted November 21, 2023 I'm more curious about getting different drop-down values conditionally based upon a different drop-down's value. Looks like something else to have fun learning! Quote Link to comment
Sam Jones Posted November 21, 2023 Author Share Posted November 21, 2023 1 hour ago, SamIWas said: I'm more curious about getting different drop-down values conditionally based upon a different drop-down's value. Looks like something else to have fun learning! If we are not talking about the default OIP, this is easily done. In the Reset Event, you need the following statements IF vsoStateGetParamChng(PIOHan, OutWidgID, ParamIndex, OldValue ) THEN BEGIN {Check if the changed parameter is equal to the one you want to base the change of another parameter on} {Get the value of the changed parameter} IF theValue is a signal to change another drop down THEN BEGIN booResult := vsoPrmName2WidgetID('',NameOfParameterToChange, OutWidgID); vsoWidgetPopupClear(OutWidgID); FOR index := 1 TO NumberOfChoices DO BEGIN vsoWidgetPopupAdd(OutWidgID, NewValue[index], NewValue[index]); END END; {IF theValue is a signal to change} END; {IF vsoStateGetParamChng} Quote Link to comment
SamIWas Posted November 22, 2023 Share Posted November 22, 2023 23 hours ago, Sam Jones said: If we are not talking about the default OIP, this is easily done. In the Reset Event, you need the following statements IF vsoStateGetParamChng(PIOHan, OutWidgID, ParamIndex, OldValue ) THEN BEGIN {Check if the changed parameter is equal to the one you want to base the change of another parameter on} {Get the value of the changed parameter} IF theValue is a signal to change another drop down THEN BEGIN booResult := vsoPrmName2WidgetID('',NameOfParameterToChange, OutWidgID); vsoWidgetPopupClear(OutWidgID); FOR index := 1 TO NumberOfChoices DO BEGIN vsoWidgetPopupAdd(OutWidgID, NewValue[index], NewValue[index]); END END; {IF theValue is a signal to change} END; {IF vsoStateGetParamChng} Cool! I'll play around with this! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.