Hi folks.
In my current PowerApp I have an Html Text Box that interprests a snippet of CSV data and render an HTML table. What I would like to do is have it so that, as much as possible, a scroll bar does not render. Initially I had it set to simply auto height which worked to an extent but if there was a large amount of data it would take up too much space on the app.
What I've done is I've created and hidden a copy of this HTML text box that is the same width and contains the same information. I have hidden this from the user and set the height to auto-height. On my main text box I set the Height property to Min(HiddenText.Height, 450)
This behaves as expected but is a little... clunky. Is there a property or setting I'm missing? Thanks in advance!
Hi @RTW
To solve your issue, you need to create 2 HTMLText controls, in the same X and Y position. One over another, same Width.
BUT, here is the trick!
The first one, called HTMLText_1 (for example), must have Visible=False and AutoHeight=True. You will use it just to determine the needed height.
The second HTMLText control, called HTMLText_2 (for example), must have Visible=True and AutoHeight=False. This one will show the data in screen.
Then, you will set HTMLText_2.Height=Min(HTMLText_1.Height, 300).
So, you will limit the Height of your text to 300, in this example.
Does it solve your issue? Please, let me know!
Thanks.
Yeah that's exactly what I was thinking. You'll obviously need to experiment. If it's always an HTML table going in there and the cell height is fixed it should be predicable by counting the rows of the collection or data source that's going into the table.
@WillPage , I just want to make sure I'm getting this correctly. I'd figure out in what length amount of data I would need to get to my maximum desired height, and create a logical statement that turns auto height off if it is greater than that, or on if it is less than that?
AutoHeight is a boolean input, so you can use that to evaluate the length of the string in the Text property, or the number of rows of your CSV data, e.g. Length(HtmlText1.Text) > 200 or if your CSV data is in a collection, CountRows(col_CSV_Data) > 20 or whatever. Set the Height property statically to the maximum you want it to be.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2