ANSWERED: Panel Movement Proportional to Screen Size

I have a question that I’ve never ran into before. I have two panels… one has a grid of 9 boxes wide, and another panel that will act as a selector to place over one of the 9 boxes. Something that will work similar to a Minecraft selection bar for inventory items. I need help developing a way to move the selector to the right spot no matter what the screen size or resolution is. The rest of the UI already scales correctly, just can’t get the movement to scale correctly. Anyone with any thoughts of how I can accomplish this please let me know. Thanks in advance.

Answered my own question. I put the code below in case anyone was curious how I solved it. I switched them from Panel to Image.

public Image inventory;
public Image invSelector;

    float currentPotx;
    float minX, maxX;

    void Start()
    {
        minX = invSelector.rectTransform.anchoredPosition.x;
        maxX = invSelector.rectTransform.anchoredPosition.x + (invSelector.rectTransform.sizeDelta.x * 8);
        
    }

    // Update is called once per frame
    void Update () {
        var d = Input.GetAxisRaw("Mouse ScrollWheel");

        currentPotx = invSelector.rectTransform.anchoredPosition.x;

        if (d > 0f && currentPotx < maxX)
        {
          

            currentPotx += invSelector.rectTransform.sizeDelta.x;
          
            invSelector.rectTransform.anchoredPosition = new Vector3(currentPotx, invSelector.rectTransform.anchoredPosition.y);
        }
      
        if (d < 0f && currentPotx > minX)
        {
            currentPotx -= invSelector.rectTransform.sizeDelta.x;
     
            invSelector.rectTransform.anchoredPosition = new Vector3(currentPotx, invSelector.rectTransform.anchoredPosition.y);
        }
    }

Make sure the anchor points on the selector are set to the same exact size as the selector image… might need to scale the image at first to make it work perfectly, but it works.