x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UMG getting the screen position of a child widget

I am trying to create a floating tooltip the will contain information about the item icon you are hovering over. All the item icons are widgets that are in a uniform grid panel. I need to be able to get the position of the item icon to know where I should display the tooltip.

I checked the documentation and it says the only setter's are exposed. How can I get the correct position to place the tooltip?

Product Version: Not Selected
Tags:
more ▼

asked Nov 14 '14 at 09:31 PM in Blueprint Scripting

avatar image

TM317
76 9 12 18

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello TM317,

I had this issue a few days ago. I have submitted a feature request (UE-5497) to the development team for further consideration. Thank you for your time and information. I will provide updates with any pertinent information as it becomes available.

Make it a great day

more ▼

answered Nov 14 '14 at 10:32 PM

avatar image

Rudy Q ♦♦ STAFF
47.5k 545 132 522

avatar image polymatheddy Nov 24 '14 at 10:59 PM

Any knowledge on this? 4.6? Having trouble with this as well!

avatar image Rudy Q ♦♦ STAFF Nov 26 '14 at 06:20 PM

Hello polymatheddy,

There exists no new information on this topic at this time. I will provide updates with any pertinent information as it becomes available.

avatar image DesertEagle_PWN Jun 14 '15 at 09:21 PM

Well, I guess I follow this page and wait... =(

avatar image Rudy Q ♦♦ STAFF Jun 15 '15 at 01:15 PM

Hello DesertEagle_PWN,

This feature has already be implemented in to the engine. This feature should be available in the 4.7 and higher versions on the engine. I hope that his helps.

Example:

alt text

Make it a great day

avatar image DesertEagle_PWN Jun 18 '15 at 11:09 PM

Thank you very much Rudy, these nodes had slipped under my radar. Thanks for sharing and hopefuly this page will be useful to others looking to accomplish the same thing.

avatar image majieric May 06 '16 at 06:01 AM

I have buttons laid out in a Grid Panel and when I use "Slot as Canvas Slot", it returns 0,0 for the location and 0,0 for the size.

I can't tell if the size and location really are only available for content laid out in Canvas Panels or if the "casting" to a Canvas Panel will allow the developer to reveal the location and size of the component.

Can you clarify?

avatar image ryanjon2040 May 06 '16 at 08:14 AM

Are you using Slot as Canvas Slot on the buttons inside Grid Panel or on the Grid Panel itself?

If you want to get position of the buttons inside Grid Panel then you should use Slot as Grid Slot. You can see what slot it belongs to if you select the widget inside UMG Designer and check the details tab.

alt text

example.png (18.6 kB)
avatar image Pelangi Jan 29 '17 at 02:34 AM

Hi Rudy, I'm currently using 4.14. The GetPosition node will give you a relative position to the containing widget and not the exact screen pixel position. So if you place a widget inside a ScrollBoxPanel, and then scroll it, the GetPosition will give you a fixed value and not a dynamic value due to changes in the screen pixel position. Are you sure it is the one?

avatar image Rudy Q ♦♦ STAFF Jan 30 '17 at 02:12 PM

Hello Pelangi,

Slot as canvas slot will not work if the widget is not a child of the canvas slot. I hope that this information helps.

Make it a great day

avatar image Pelangi Mar 26 '17 at 02:39 AM

Hi Rudy, thanks for the info. But the topic of this post is about screen position right? And not the relative position of a widget to its container widget. Slot canvas will work if the container is a canvas. But it does not give the screen position of a widget inside it. Try making a ScrollBoxPanel, and then add CanvasPanel inside it, and then add any widget inside that CanvasPanel, and then scroll it. The position of the innermost widget will be constant. So it does not reflect screen position. Is there any other function which is required here?

avatar image Rudy Q ♦♦ STAFF Mar 27 '17 at 01:12 PM

Hello Pelangi,

If you are using 4.15 you could use the "Get cached Geometry" node in combination with the "Local to Viewport" node. I have provided an example below. I hope this information helps.

Example:

alt text

Make it a great day

avatar image rit Oct 01 '17 at 05:00 PM

I'm using 4.16 and I'm having the same problem.

Get Cached Geometry will not work if my widget is a child widget of a scrollList and call this function while scrolling.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question