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"

How do I set the font size of the UMG ComboBox (String)?

I've been playing around the with new UMG ComboBox (String) widget and I haven't been able to find out how to set the size of the font in the widget, it always comes out really small. What can I do to resolve this? If it would take C++ I can do that if necessary.

Product Version: Not Selected
Tags:
more ▼

asked Nov 01 '14 at 07:30 AM in Blueprint Scripting

avatar image

wolfadex
111 3 4 7

avatar image ZenTechEntertaiment Nov 07 '14 at 09:42 AM

I need this answer, too.

avatar image TorQueMoD Sep 27 '16 at 09:40 PM

Just to make the Simple Answer more visible:

You simply need to add a ScaleBox to your widget, specify the size you want it to be (for example X: 400, Y: 80), then drag your ComboBox into the ScaleBox in your widget's Hierarchy Panel and hit the Fill Horizontal and Vertical buttons.

alt text

Thanks to BitOWhit and zrocweb for the solution.

avatar image Interitus384 Nov 09 '14 at 09:54 PM

Yeah this doesnt seem to have a font or appearance setting...

avatar image noms Dec 19 '14 at 07:28 AM

As far as I'm aware this still hasn't been fixed in 4.6, but in case you haven't already got a way around this, I'd recommend maybe using Rama's tutorial for a scrollable/clickable list of items: https://wiki.unrealengine.com/UMG,_Create_Scrollable_List_of_Clickable_Buttons_From_Dynamic_Array

It provides a good alternative.

avatar image invisiblebattles Sep 24 '15 at 05:00 AM

Has this been implemented yet?

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

Hello invisiblebattles,

Thank you for your interest in this feature. I will be sure to bump the community interest for this report. In the mean time please take a look at the workaround, many users have met with success using the method mentioned. I hope this information helps.

Make it a great day

avatar image erebel55 Jan 07 '16 at 08:03 PM

How is this not a core feature? Kind of embarrassing...

avatar image wolfadex Jan 07 '16 at 08:11 PM

See zrocweb's answer for why it may have been done this way and aBitOWhit's answer for pictures of how to implement zrocweb's answer.

avatar image erebel55 Jan 07 '16 at 08:21 PM

No, this is just horrible design. This widget should never have been released. zrocweb's answer doesn't help me change the font type. It helps me "scale" it up which isn't even the correct way to implement font size either. The ootb combobox is useless without being able to change the font type, size, etc. This is just bad.

avatar image zrocweb Jan 08 '16 at 04:20 PM

erebel - This is not horrible and it's not bad either. It does work and it's NOT scaling in any way, shape or form. If you are actually scaling, then your not doing it correctly. There are multiple ways to achieve what your doing and myself and Ariath have provided two of these ways. If you read my last post, I put steps into the posting that actually walk you through what you need to do. The scaling is based on the other containers sizes and scale settings, so you must have something set wrong. If you look at aBitOWhit's posts below mine (see my pics too) as well as his pictures, you'll see it works really quite well. Your containers will auto-scale when the engine renders which is the main reason, I believe, that font sizes are not part of the initial widget as people tend to over size things and thus this eliminates a lot of bad looking user fields.

avatar image Gmi Jan 31 '16 at 02:42 AM

So I guess font size has not been added yet?

zrocweb's method works but some of my drop down boxes flicker, and the scrolling button is twitches around if I try to use it. Using the scroll button on the mouse works fine though to scroll.

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

2 answers: sort voted first

This is a quite old question, but i think i found the solution without needing using C++ :) .

The key is the OnGenerateWidget event of the ComboBox (String). You can use it to use your own widgets when the ComboBox's ScrollBox is created.

I followed these steps:

  • Create a new Widget (i named mine "ComboBoxItem") and, after deleting the Canvas, add a Border, a ScaleBox, and, inside the ScaleBox, add a Text. Doing so, the Text will scale to fill the ScaleBox. Now, we set the Text "Is variable" check to true.

  • Now, in our ComboBox (String), we need to go to the Events section and bind a new function to the OnGenerateWidget event.

  • Lastly, in the new function, we have a String input parameter (the item that is being added to the ComboBox's ScrollBox) and a Widget output parameter. We now create a new instance of our ComboBoxItem, and assign the function input parameter to its label's text. We only need to return the created widget and, that's it!

Here is my ComboBox as a sample:

alt text

And the ComboBoxItem i made:

alt text See ya!

more ▼

answered May 06 '15 at 10:36 AM

avatar image

Ariath
171 6 75 28

avatar image WACOMalt May 10 '15 at 04:35 PM

This looks like the only workaround for now, but I cant get it working. It seems the only thing I can't figure out is the "and assign the function input parameter to its label's text." bit of the last step. I cannot, despite setting the textbox to isvariable, get it to be accessed by the function in the menu. I cant do a "set" on it. Any ideas?

Edit: tried this: alt text

But the text on the comboboxitem widgets (which it does create correctly) are empty.

alt text

avatar image Ariath May 10 '15 at 04:54 PM

If i have understood your doubt, the TextBlock has a SetText function to modify its content.

See ya!

avatar image Ariath May 10 '15 at 06:08 PM

Hmm... how did you create the combobox item? Maybe the widget, or the text, is too small.

Here is mine: alt text

Also, i have re-read my guidelines and i forgot to specify that, before adding the ScaleBox, i added a Border (so, i can set a background).

See ya

avatar image WACOMalt May 10 '15 at 09:48 PM

Ah there we go. The issue was I had used TextBox, not Text. I didnt see "Text block" in the pallete to choose, didnt realise it's name changes once added to "block".

Everything works perfect now, here's a screenshot fo the setup for anyone else who needs it:

alt text alt text

avatar image Ariath May 10 '15 at 10:47 PM

I'm glad of hear it :) .

I have updated my post with the ComboBoxItem image and replacing the TextBlock references with Text.

Let's hope the UE4 staff give us the possibility to edit the font settings of the ComboBox in the future.

See ya!

avatar image polymatheddy May 19 '15 at 06:35 PM

Adding my voice to this: bump

avatar image Rudy Q ♦♦ STAFF May 19 '15 at 07:08 PM

Hello polymatheddy,

I went ahead and doubled checked the status of this issue for you. It would appear that this issue has not as of yet been resolved. However, I went ahead and bumped up the community interest.

Make it a great day

avatar image polymatheddy May 21 '15 at 08:20 PM

Thanks Rudy! Much apreciatted

avatar image DatapawWolf Jul 05 '15 at 07:02 PM

Is this still being worked on? It is quite important to my project. Thanks!

avatar image Rudy Q ♦♦ STAFF Jul 06 '15 at 02:27 PM

Hello DatapawWolf,

I have recently bumped the community interest in the report for this issue to provide it with more visibility and to reflect the growing interest of the community. Until such time as an official solution can be implemented I would suggest the workaround provided above, as it works well for most situations. I hope that this information helps.

Make it a great day

avatar image quality Jul 20 '15 at 05:59 PM

I'll add another voice of interest in this being a higher priority. The workaround is acceptable, but not ideal. Thanks!

avatar image Wallenstein Aug 21 '15 at 08:44 AM

Yes, I just came across this as well. Any form of GUI that includes a combobox will need this feature. Right now the only widget that looks like it was created by a bunch of ants walking across my screen is the combobox.

I would vote for this to be fixed ASAP since it really ruins the looks of any screen mask

avatar image Rudy Q ♦♦ STAFF Aug 21 '15 at 01:02 PM

Hello Wallenstein,

This issue has not been updated to resolved as of yet. However, I will be sure to bump up the community interest for this issue. Thank you for your time and information.

Make it a great day

avatar image Raikoh Sep 01 '15 at 07:24 PM

Plz can you fix this :)

avatar image Rudy Q ♦♦ STAFF Sep 01 '15 at 08:31 PM

Hello Raikoh,

Thank you for your interest in this feature. I will be sure to bump the community interest for this report. In the mean time please take a look at the workaround above, many users have met with success using the method mentioned. I hope this information helps.

Make it a great day

avatar image AlpacaWare Sep 05 '15 at 08:21 AM

Hello Rudy,

I understand that the Engine has quite a lot of moving parts, but I'd like to re-bump the community interest in this issue. The workaround is great, but a more simple solution would save newcomers some internet searching time.

Thanks!

avatar image Rudy Q ♦♦ STAFF Sep 08 '15 at 01:41 PM

Hello AlpacaWare,

Thank you for your interest in this issue I will be sure to reflect that interest in the report and bump it accordingly.

Make it a great day

avatar image MugenCity Sep 27 '15 at 09:13 PM

I am also running into this issue. Being able to provide a font would be great.

avatar image haimat Sep 30 '15 at 11:18 PM

We experience the same problem. So we went for the workaround (using custom widgets for the selection options), as described above in this thread. However, it turned out this workaround doesn't work when the combo box is added to a widget which in turn is added as child to another widget. I have opened a bug report here. Any feedback would be very much appreciated.

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

Hello haimat,

I have responded to you on the other thread. Please post any further updates to that thread.

avatar image zrocweb Nov 12 '15 at 05:05 PM

1) Create a Horizontal Box onto either the canvas or the root if you deleted the canvas. 2) If you want to give your Combo Box a label, place text inside the Horizontal Box, otherwise proceed to step 4 3) Place a "spacer" inside the Horizontal Box 4) Place a "scale box" inside the Horizontal Box 5) Place a Combo Box(string) inside the scale box

Adjusting the scaling for the combo: - Click on the "scale box" you added into step 4. - On the details tab, you will see the horizontal and vertical alignments as well as size. Choose "Fill" for size and then select your h/v alignment. Best course for larger sizes is to horizontal and vertically fill. - Directly below that you will see the "stretching" properties. - Set stretching Direction to "both" then Set Stretch to "scale to fit" - Set User Specified Scale to something like 2 or 2.5 if you choose to set the "stretch to user specified", otherwise this setting has no impact. - Click on your "combobox(string) and set the horiz. & vertical alignments to "fill". Your combo box will now show up in a much larger scaled or rendered size!! I'm taking all these steps from memory and I think I got them all...

NOTE: This scaling trick works ALL the time except when you place your horizontal box with all the other widgets, inside another widget. For example, if you have a border widget and then place your horizontal box as created above inside the border widget, the scaling will not take place because it's being re-scaled off the border widget which then reduces the overall scaling of h-box and scale box. It's a little tricky sometimes!

Two examples from a menu system project I'm working on now.. alt text alt text

avatar image USMC1812 Jan 29 '16 at 07:11 AM

Add an interest bump for me too! I tried using some combo boxes for my UI on an android device and the options were so small I couldn't even select them with my finger and barely read them! I guess I'll try the workaround, but this really should be a built in feature!

avatar image erebel55 Jan 07 '16 at 09:15 PM

@Ariath can you elaborate on how you did this? "Now, in our ComboBox (String), we need to go to the Events section and bind a new function to the OnGenerateWidget event." Did you create a new widget that contained the ComboBox (String)? Or what?

avatar image erebel55 Jan 07 '16 at 09:35 PM

Actually I can't find the OnGenerateWidget event at all. alt text

events.png (39.9 kB)
avatar image erebel55 Jan 07 '16 at 10:26 PM

I figured out where you bind to the OnGenerateWidget. So this is a per combo box solution that needs to be implemented for every combobox individually. http://puu.sh/mnizI/a0774f23d1.png

Also just to note, I think something has changed with Scale Box since this fix was first discovered. Mine shows up like this. alt text

avatar image aBitOWhit Jan 07 '16 at 11:07 PM

Are you simply trying to set the text for your combo box selections? Item1, Item 2, etc (1)? If so, you can add them on the right details tab under content by adding additional elements (2). I also set the "Selected Option" as the first element name so it is visible and not blank. You can size a combo box size the same way as the others by embedding it within a scale box (3). You can then bind to the selected text the user selects by binding the onSelectionChanged Event on the right. If this is all about changing the actual font than never mind..heh.

Apologies if I am totally missing the point, just trying to help out. :)

ComboBox example I added Add combo box elements Binding the selection event

cb1.png (61.1 kB)
cb2.png (5.1 kB)
cb3.png (5.8 kB)
avatar image aBitOWhit Jan 07 '16 at 11:11 PM

On the text being off, try setting it to justify instead of left align. This should make it stretch the scale box. justify

justify.png (1.5 kB)
avatar image erebel55 Jan 08 '16 at 12:34 AM

My end goal was to make something like this

alt text

I wanted to change the font style and size. So I implemented Ariath's solution. Which actually worked for the most part.

My results are here

alt text

However, there is a bug with the combobox so that we can't change the dropdown arrow image. Also, with Arianth's solution it would be hard to get the dropdown section and the button to look right together. Basically, I've come to the conclusion that this combobox element is unusable for real game implementations until Unreal fixes it.

dropdown.png (21.1 kB)
results.png (53.5 kB)
avatar image aBitOWhit Jan 08 '16 at 05:16 AM

I see what you are saying now. I was able to get closer to the basic look you were getting at with a quick image on the drop down but cannot get the text color to change to white so you could not see what it said. I was also able to get the lighter arrow using an image but it showed colored on the right but the color on the dropdown was still black. A lighter dropdown graphic did not look as good...strange. Good luck with it and sorry I was not much help. alt text alt text alt text

drop1.png (3.2 kB)
btnarr.png (7.1 kB)
dropdark.png (2.3 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hello wolfadex,

It appears that you are correct. Thank you for your input and time. I have submitted a feature request ( UE-5489) to the development team. I will provided updates with any pertinent information as it becomes available.

Make it a great day

more ▼

answered Nov 14 '14 at 08:07 PM

avatar image

Rudy Q ♦♦ STAFF
47.5k 545 132 522

avatar image wolfadex Nov 14 '14 at 08:28 PM

Thank you!

avatar image fanzypantz Nov 28 '14 at 06:26 PM

Yeah that would be nice. I can't wait to see all the new stuff you can do with UMG in 4.6 because its already damn powerful :)

avatar image Godling Dec 20 '14 at 01:12 AM

Great. Will be nice to see comboboxes getting the same love text-blocks do.

Also, please give that same love to the combobox list window and not just the displayed choice. :)

avatar image Hulkysaurus Mar 12 '15 at 12:49 PM

Has there been any progress on this? I could also do with being able to scale the size of the open combo-box list; its far too small to be useable on a mobile touch device. It would be handy to be able to change the appearance of the dropdown list too.

avatar image Rudy Q ♦♦ STAFF Mar 12 '15 at 01:18 PM

Hello Hulkysaurus,

I went ahead and doubled checked the status of this issue for you. It would appear that this issue has not as of yet been resolved.

Make it a great day

avatar image TheZMan Mar 26 '15 at 01:15 AM

Please add another +1 vote from us. Seems like font size is quite an omission from a UI editor.

avatar image arbopa Sep 12 '15 at 03:12 PM

Hey Epic Staff... it's been quite a long time, this seems to be a simple thing. Instead of the hundreds of other new features can you guys get on stuff like this? You know, finish the features that already exist before moving on?

avatar image Rudy Q ♦♦ STAFF Sep 14 '15 at 02:23 PM

Hello arbopa,

Thank you for your interest in this issue, I will be sure to bump up the community interest on my report. Please check out the workaround posted below, many users have met with success using this method. I hope this information helps.

Make it a great day

avatar image zrocweb Oct 26 '15 at 01:34 PM

Let the engine handle your scaling. It's simple and quite effective 1) Create a Horizontal Box onto either the canvas or the root if you deleted the canvas. 2) If you want to give your Combo Box a label, place text inside the Horizontal Box, otherwise proceed to step 4 3) Place a "spacer" inside the Horizontal Box 4) Place a "scale box" inside the Horizontal Box 5) Place a Combo Box(string) inside the scale box

Adjusting the scaling for the combo: - Click on the "scale box" you added into step 4. - On the details tab, you will see the horizontal and vertical alignments as well as size. Choose "Fill" for size and then select your h/v alignment. Best course for larger sizes is to horizontal and vertically fill. - Directly below that you will see the "stretching" properties. - Set stretching Direction to "both" then Set Stretch to "scale to fit" - Set User Specified Scale to something like 2 or 2.5 if you choose to set the "stretch to user specified", otherwise this setting has no impact. - Click on your "combobox(string) and set the horiz. & vertical alignments to "fill". Your combo box will now show up in a much larger scaled or rendered size!! I'm taking all these steps from memory and I think I got them all...

NOTE: This scaling trick works ALL the time except when you place your horizontal box with all the other widgets, inside another widget. For example, if you have a border widget and then place your horizontal box as created above inside the border widget, the scaling will not take place because it's being re-scaled off the border widget which then reduces the overall scaling of h-box and scale box. It's a little tricky sometimes!

Two examples from a menu system project I'm working on now.. alt text alt text

avatar image joshcamas Nov 12 '15 at 04:03 AM

It looks like this "feature" still hasn't been added, any news on if their planning on adding it? :)

avatar image MugenCity Nov 12 '15 at 05:03 AM

Seconded in 4.10. Still in need of this feature.

avatar image Rudy Q ♦♦ STAFF Nov 12 '15 at 02:23 PM

Hello MugenCity,

I went ahead and double checked on this issue for you. You are correct, this issue's status has not been updated to fixed as of yet. I will be sure to bump up the community interest for this issue. I would suggest taking a look at the answer give by Ariath as a possible workaround because other users have met with success using that technique.

Make it a great day

avatar image wolfadex Nov 12 '15 at 02:44 PM

Also check out the answer by rocweb. It works very well and is incredibly simple to implement.

avatar image aBitOWhit Dec 06 '15 at 03:59 PM

Thanks zrocweb, really easy!
Need to move your answer to the top, heh. Drag on scale box and then drag your control into the scale box and set to full scale for horizontal and vertical. alt text alt text

teammenuwork2.png (157.1 kB)
teammenu.png (109.2 kB)
avatar image zrocweb Jan 08 '16 at 04:23 PM

Hey! Your welcome.. Glad I could help.. It's actually quite easy once you manage to figure out which container, depending on how many containers are in your widgets, to place it. Has worked for me over a span of projects and have never had an issue with it over-scaled or anything.

(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