Jump to content
Developer Wiki and Function Reference Links ×

Managing drop downs in the default OIP


Sam Jones

Recommended Posts

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?

Link to comment
  • 3 weeks later...
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}

Link to comment
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!

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...