Set Position In Viewport

When I set position in view port only a tiny bit of the widget appears at the location.

To clarify, this is a widget you are attempting to put/set position of, on top of another widget?

If so, why are you setting it’s position via mouse position? Is it not a static position within the underlying widget?

Also, have you attempted to set it’s position after the add to viewport?

I’m not a 100% sure of your widget layout/design so this may not work for your case but perhaps instead of using the Set Position in Viewport node, you simply put a Scale Box next to the main inventory window (or wherever you want the information to be displayed) then when the mouse hovers over the item, you put the new Inventory Info widget inside of the Scale Box and on dehover, you remove it?

If you set the Scale Box to ensure “Size To Content” is checked, then regardless of the size of your Info widget, the Scale Box will dynamically scale to it while ensuring you have a consistent layout each time. This is ultimately what the Scale Box was designed for.

Let me know if this helps and/or works for you! Good luck!

Well you could put a scale box next to each button location and set it up so that if you hover over “button 2” then the info would populate “scale box 2” etc. However, this is probably not optimal.

You can create custom tool tips. As you know, tool tips in most applications, including UE4 widgets, display at the mouse location when hovering over an item. I’m not too familiar with making custom tool tips so I’m not 100% sure if you can add a widget as a tool tip but it would be worth a shot.

For your buttons you want to have the hover effect on, find in the details panel the section for enabling tool tips and enable them. There should be a drop down button to Bind the tool tip to an event. Select “Bind” and in the drop down list select “Create New Binding.” Put in the necessary code to create your Inventory Info widget and add it to viewport. Don’t put in anything about setting it’s location as this should be already calculated via the original tool tip code.

Mess around with that and see if you can’t get something to work! Let me know!

While I think the tool tip option I mentioned above is probably the best way to go if you can get it to work, I was just looking over this and had another thought. The code you show is the code to add the Inventory Info widget, setting it’s location, from the main inventory widget. Looking at the image you provided, it does appear as though it is doing what you want, from the code you provided. Perhaps the issue is not with the main Inventory widget but in the underlying Inventory Info widget. It seems as though the widget appears where you want it, only it is scaled down to an unreadable size.

To test, I would suggest ensuring your Inventory Info widget content is wrapped in something like a Size Box and make the size box the exact dimensions you need for the Inventory Info window (or select Size To Content if you have largely varying sized content that gets displayed.)

It could all be just scaling down in size because there aren’t containers around the Inventory Info to tell it how big it is suppose to be, even though in the designer it looks correct in code, it doesn’t know any better because you (may not have) specified how big it’s suppose to be.

Hopefully this makes sense! Let me know!

Try specifying exact sizes of the size box instead of just size to content. Also, is the info boxes contained in something like a vertical box? Try Size Box → Vertical Box → your info boxes.

Getting the result you get using the size box proves we are on the right track, that it’s a matter of wrapping and sizing everything accordingly. Create a backup copy of the widget and then don’t be so afraid to experiment. Look at all the options you get for widgets and read their tool tips to see what they do. If something sounds like what you may need then try it and see if it works. If it doesn’t then remove it and try something else but as I mentioned, the results you have to this point prove that it is a sizing/containing issue.

Awesome, glad to hear it! If the widget is a consistent distance away every time then just add/subtract from the appropriate X or Y coordinate after you get the mouse position and before you plug it into Set Location To Viewport.

If my answer solved your issue it would be greatly appreciated if you accepted the answer by clicking the check mark located next to the original answer. You’ll know you did it right when the answer and all the comments turn green! You’ll get badge points for doing it as will I! Thanks and good luck! (Note: writing a comment after accepting an answer will deselect it as the correct answer.)