cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamieReis
Level: Powered On

Rich Text Height and Width Properties

The rich text height and width properties are not working properly when using a formula.

I have a header that is dynamically resizing based on the screen width. I then have the rich text box width tied to that header RichText.Width=Header.Width--very simple.  This works with all other controls that I have used, but not the rich text.

 

Same issue with dynamic height.

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: Rich Text Height and Width Properties

@JonathanGibbs , can you share an app that has the kinds of formulas you're using? I want to see how you're referencing the variable.

 

Attached is the test app I made that includes how I set up the app to be responsive.

 

I'd walk through more, but the docs for making a responsive app are very thorough already:

https://docs.microsoft.com/powerapps/maker/canvas-apps/create-responsive-layout

 

Please see sections on settings including switching scale to fit off, lock aspect ratio off.

View solution in original post

13 REPLIES 13
Highlighted
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Rich Text Height and Width Properties

Which version of PowerApps are you running? I've tried the same scenario with 3.18075.22 and it worked fine:

RichTextEditorDynamicDimensions.gif

Also, what are the expressions that you are using for width and height of the rich text editor?

JamieReis
Level: Powered On

Re: Rich Text Height and Width Properties

Using version: 3.18075.22

 

This works intermittently in the development environment, as do many features/functions that then do not work when you publish.

It is working correctly in the development environment for me also.

 

I am using the same exact expressions that you are in the example below.

 

Works fine in dev, then when I deploy, the rich text bar is not spanning to the same width as the header, nor is it spannin the length of the two other boxes at the left.

 

Height: NotesBanner.Width

Width: AttendeeGallery1.Height+HomeMeetingDetails.Height+12

 

PowerAppsBadWidth_Capture.JPG

 

JonathanGibbs
Level: Powered On

Re: Rich Text Height and Width Properties

This is still a problem in 3.19014.10. Fine in dev environment, fails in published.

 

Any updates or workarounds yet?

PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: Rich Text Height and Width Properties

Hi @JonathanGibbs,

We were not able to replicate the issue.

As that is an old version of PowerApps, can you save and republish your app?

 

If the problem persists, can you provide more details on your setup: 

  • what version is the OS
  • what version is the player in the device?
amoro
Level: Power Up

Re: Rich Text Height and Width Properties

Hi everybody,

I've got the same issue; when I use rich text box in my power app both width and height properties don't work properly. Actually, they do in dev mode, but they don't after publishing.

Does anybody know if any fix has been released?

Thanks

Alex

JonathanGibbs
Level: Powered On

Re: Rich Text Height and Width Properties

Thanks @Mr-Dang-MSFT 

Just republished to 3.19024.16 and problem persists. A Rich Text Editor's width is set to a calculated value (screen width * 0.7) and it works fine in dev but does not achieve correct width in play.

App Settings are Scale to Fit true, Lock Aspect Ratio false.

Using Windows 10, Edge, playing on PC running Edge.

Is it the Lock Aspect Ratio setting that's causing the problem? The app is being designed in 4*3 but I'm using the Lock Aspect Ratio false setting (plus mostly calculated dimension values in controls) to allow full screen when used on non 4*3 aspect ratios. All other controls adapt correctly to a different aspect ratio.

 

JonathanGibbs
Level: Powered On

Re: Rich Text Height and Width Properties

This is still not right I'm afraid @Mr-Dang-MSFT. To replicate:

Create a new canvas app (Edge on a PC). In App Settings Screen size set Orientation to Landscape, Size 4:3, Scale to Fit On, Lock aspect ratio Off, Lock Orientation On.

Put a Label on Screen 1 with X=40, Y=40, Width=Screen1.Width-80, Height=(Screen1.Height-80)/2. Set its fill to LightGray so you can see it.

Put a Rich Text Editor below it with same properties except Y=Label1.Y+Label1.Height.

Play the App in dev mode and the two controls will be the same size, one below the other. Resize the browser window and they will resize correctly.

Publish it and load the published App. The RTE's X and Y properties will be correct but Width and Height are both wrong (less than they should be). If the browser window is resized, the Label resizes correctly but not the RTE.

Any workaround or chance of a fix?

PowerApps Staff Mr-Dang-MSFT
PowerApps Staff

Re: Rich Text Height and Width Properties

@JonathanGibbs ,

Can you do this with Lock Aspect Ratio On and let me know what results for you?

JonathanGibbs
Level: Powered On

Re: Rich Text Height and Width Properties

@Mr-Dang-MSFT 

Sure. The initial scaling in the published version is correct (RTE is the same size as label), but you lose the dynamic resizing in both controls - which is the whole advantage of Scale to Fit On, Lock aspect ratio Off, Lock Orientation On.

I really like this feature, since it means apps can always fill the screen, as long as you are careful about calculated values for X/Y/H/W. All the common controls behave nicely in this configuration, but RTE is an exception.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,290)