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"

What is the most appropriate slate widget for the following function

Hi, I am searching for the the most appropriate slate widget for the following function

I want to write the score on the screen and surround it by a box. i.e. the score board.

I want to know what is the most appropriate slate widget to do the job.

SButton allows be to do so. But I don't need any functionality of the button clicks.

For now, I am sticking with a SBorder with a STextBlock inside it. But I think I might have trouble with adjusting the size of the image to the font etc.

Product Version: Not Selected
Tags:
more ▼

asked Jul 28 '14 at 04:49 AM in C++ Programming

avatar image

envenger
428 77 118 148

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

1 answer: sort voted first

STextBlock inside SBorder should do the trick but if you're really concerned about sizing your widget you can do one of the following:

  1. Create your own widget deriving SCompoundWidget, put STextBlock in it and override ComputeDesiredSize function. This function allows you control exact size of your widget.

  2. Put SBox inside your SBorder and use Height/WidthOverride variables to control widget size. So your widget hierarchy would look like this:

      SNew(SBorder) 
         [ 
         SNew(SBox) 
         .WidthOverride(X) 
         .HeightOverride(Y) 
         [ 
           SNew(STextBlock)
         ] 
         ]
    
    
    

These are the easiest solutions I can think of but for sure there is more.

more ▼

answered Jul 28 '14 at 09:01 PM

avatar image

szyszek
610 16 12 36

(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