Question regarding the drawing of hud elements to the right side of a screen

I love messing with client side vgui and huds for gmod. There is one thing that is still eluded me and that is a reliable way of drawing hud elements to the right hand side of the screen. Everytime I do it, it would seem the elements re-position depending on the clients resolution even when I am using ScrW() to position the element.

How would I go about reliably positioning an element to the right hand side of the screen? And it remain in that approximate location on all screen resolutions?

Use ScrW(), ScrH(), etc. Do stuff like:

draw.RoundedBox(0, ScrW()/1.5 - (ScrW()/4)/2, ScrH()/16, ScrW()/4, ScrH()/16, Color(21, 21, 21))

ScrW() - width of element works perfectly fine

Typically you use ScrW( ) - self:GetWide( ) - buffer; for that. If it is at ScrW( ) then since the panel 0, 0 is top left, it’d be off the screen. So - self:GetWide( ) gets it rubbing on the side. and the buffer to give it some space.

For changes in resolution:

or this to update when it does change:

Having something expand left, instead of expanding right:

-double kill-

I was using ScrW already but it seemed like for changes between clients the boxes would run out of the screen. Then I realized I was hardcoding the size of the box and not making it dynamic per the size of the screen. Thanks and sorry Dx