This is not difficult, but, because of the various master and subgroup shapes, text justifications, format fills, it does become somewhat tedious. I will explain the basic premise, then, indicate which shapes and shapesheet fields get changed, and finally provide an updated shape because of the complexity.
Basically, the Visio "IF" statement says if something is true, do this, otherwise do something else. The form is IF(test condition, do this, do something else). If you have more than one test condition, then you can catenate the if statements. So, it becomes if case A is true, do this, otherwise, if case B is true, do that, else do whatever if both not true. Probably confusing.
You now have two conditions (well, in a sense, three.) If control point less than 49% shrink box to the left, otherwise if control point is greater than 51% shrink the box to the right, other wise keep the box at full size.
The formula would be IF(controlPT<0.49*width, shrink left formula, IF(controlPT>0.51*width, shrink right formula, box width full))
The complication arises from
1.) This basic formula is used many places and
2.) the 49%, 51% may get changed on a trial and error basis.
You don't want to re-edit every formula each time these two numbers change. But, these are hidden numbers, not user controllable, so they get hard coded. To do this, I created placeholders for each number, and then made the IF statement formulas reference these numbers.
In the attached file, here's what's up:
1. Master group shape is sheet.1.
a. The Text Fields section, value cell has formula for text that changes with control position. You may want to delete this section.
b. The paragraph section, HAlign cell controls the justification. You may want to delete the formula, set initial value to 1. Normal Format UI will also clobber this entry.
2.) The main subshape is sheet.2. That's where the bottom text is located.
3.) Sheet.3 is the green box subshape.
a. Added User-defined Section to store the upper, lower deadband limits, 51% and 49%. But as actual values, not percents. You would change entries for User.UL, and User.LL. Right now they're set for 55% and 45%.
b. Revised formulas in Geometry1 section
c. Revised formulas in Fill section, Fill Pattern cell. The formula has guard function, may want delete that to allow normal fill user interface.
4.) Sheet.4 is the textbox for control position. The Text Fields section contains formulas for what gets shown.
5.) Sheet.5 is the arrow that points to the control point. Keep or delete as desired.
HTH
Wapperdude