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"

Horizontal box changing size of children

when I use the Horizontal box, it changes the size of the children. How do I prevent that from happening? I just want to use the horizontal box to change the spacing between the children, so that it automatically fits the spacing to the available screen space. the size however should NOT be changed. The very left item is in the horizontal box, while the ones on the right to it aren't yet. the one on the left should look like the one ones on the right, but it's getting squashed for some reason. alt text

Product Version: UE 4.22
Tags:
30.png (39.1 kB)
more ▼

asked Jun 24 '19 at 03:50 PM in Using UE4

avatar image

PasteteDoeniel
35 1 5 7

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

1 answer: sort voted first

That's pretty normal, widgets do not control their own size, it's controlled by the parent, and affected by alignment settings.

To prevent it, wrap elements with a SizeBox - it has size override settings. Any container trying to alter children widgets' dimensions will need to deal with the SizeBox first.

more ▼

answered Jun 24 '19 at 04:25 PM

avatar image

Everynone
15.2k 77 25 62

avatar image PasteteDoeniel Jun 27 '19 at 08:48 AM

that somewhat works, but now the issue is that it still resizes the children. alt text alt text alt text

All I want it to do is to change the padding between the children, but always keep the same size. Or at least have it keep the aspect ration.

60.png (25.8 kB)
61.png (24.2 kB)
62.png (80.9 kB)
avatar image PasteteDoeniel Jun 27 '19 at 11:31 AM

figure it out. I ended up using the overlay instead of the Horizontal box. the Overlay respected the desired size and aspect ratio. Exactly what I needed

avatar image Everynone Jun 27 '19 at 12:20 PM

The thing with containers is they have slightly different rules and it's just a matter of experimenting what works best for certain scenarios. Some containers come with extra slot functionality (wrap box) allowing you to specify padding directly for the slot itself.

But you can, of course, include the padding in the child itself instead.

Glad to hear you've worked it out, good luck with the rest!

(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