Hello!
I think I understand what you’re trying to do, but correct me if I misunderstood.
You want to drive an event based on the value change of your selected axis, that axis is one of a few datapoints mapped externally to the compound widget. How I’ve been taught to do this is by creating invisible widgets that drives the event. I create an image list at 0,0 and make it invisible, then I bind my numeric value to it, make the default -1, and in the event bindings I use “SelectedIndexChanged“ to drive the event.
I’ll paste an example below, but I highly recommend if you are going to do anything complex in mappview that you move to eventscripts instead of the xml editor for events. It was released in mappview 6.3 and I’ve rewritten almost all of my widgets using it.
My example is for changing the visibility of a label and rectangle based on a numeric value, but concept is the same regardless of widget type
Declare widgets
<Widget xsi:type="widgets.brease.Rectangle" id="recLoadDisabled" top="0" left="0" width="600" height="405" zIndex="30" borderStyle="inset" borderWidth="3px" cornerRadius="10px" backColor="rgba(128, 128, 128, 1)" opacity="0.75"/>
<Widget xsi:type="widgets.brease.ImageList" id="invisLoadDisabled" top="0" left="0" selectedIndex="-1" zIndex="49" imageList="['']" visible="false"/>
Bind the invisible widget to your datapoint
<Properties>
<Property xsi:type="StructureBindableProperty" name="Data" type="WLCXFR_INTERFACES_typ" readOnly="false">
<Description>Description will be shown in property grid.</Description>
<Mappings>
<!-- invisible widgets for internal mapping -->
<Mapping widget="invisLoadDisabled" type="Number" property="selectedIndex" mode="twoWay" memberPath="LoadInterface.interfaceEnabled" mapToNode="false"/>
</Mappings>
</Property>
</Properties>
Then create an event for the invisible widgets index change
<EventBindings>
<!-- source and target can only be widgets within the compound widget. -->
<EventBinding id="LoadDisabled">
<Source xsi:type="widget.Event" widgetRefId="invisLoadDisabled" event="SelectedIndexChanged"/>
<EventHandler condition="selectedIndex = 1">
<Sequence>
<Step order="0">
<Action>
<Target xsi:type="widget.Action" widgetRefId="recLoadDisabled">
<Method name="SetVisible" value="false"/>
</Target>
</Action>
</Step>
<Step order="1">
<Action>
<Target xsi:type="widget.Action" widgetRefId="lblLoadDisabled">
<Method name="SetVisible" value="false"/>
</Target>
</Action>
</Step>
</Sequence>
</EventHandler>
<EventHandler condition="selectedIndex = 0">
<Sequence>
<Step order="0">
<Action>
<Target xsi:type="widget.Action" widgetRefId="recLoadDisabled">
<Method name="SetVisible" value="true"/>
</Target>
</Action>
</Step>
<Step order="1">
<Action>
<Target xsi:type="widget.Action" widgetRefId="lblLoadDisabled">
<Method name="SetVisible" value="true"/>
</Target>
</Action>
</Step>
</Sequence>
</EventHandler>
</EventBinding>
That should accomplish the style change you are trying to do. If you’d like an example of the same in event scripts let me know.