cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
xzDan
Level 8

Reliable tab-spacing of text?

In order to reduce the number of text boxes in my gallery, and to avoid using a datatable due to its limited formatting options, I wish to use ideally one text box and space out the entries appropriately. (It looks like table of data). At home, I found using Char(9) to be appropriate, with e.g. "ThisItem.Name & Char(9) & Char(9) & ThisItem.Price" etc., but at work, I find that the Char(9) seems to be equivalent only to a typical space gap. Is there any appropriate and reliable way to appropriately space or pad entries? I did try to do a Left(ThisItem.Name & " ",10), say, but the character spacing differs and can still lead to misaligned entries.

1 ACCEPTED SOLUTION

Accepted Solutions
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Reliable tab-spacing of text?

A gallery with properly placed label controls would be the best way to create such a table (if the data table doesn't have what you need), but if you want to go the text box (label?) route, then you will need to use a fixed-size font (such as 'Courier New') in the text box, otherwise the characters will be out of order.

Another alternative, if you're comfortable with HTML, is to use a HTML Viewer control, where you can have more control over formatting of each individual cell in a table.

The attached app shows both alternatives. To open it, save it locally, go to https://create.powerapps.com, select Open and Browse Files, then find the place where you saved it.

Hope this helps!

View solution in original post

2 REPLIES 2
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Reliable tab-spacing of text?

A gallery with properly placed label controls would be the best way to create such a table (if the data table doesn't have what you need), but if you want to go the text box (label?) route, then you will need to use a fixed-size font (such as 'Courier New') in the text box, otherwise the characters will be out of order.

Another alternative, if you're comfortable with HTML, is to use a HTML Viewer control, where you can have more control over formatting of each individual cell in a table.

The attached app shows both alternatives. To open it, save it locally, go to https://create.powerapps.com, select Open and Browse Files, then find the place where you saved it.

Hope this helps!

View solution in original post

xzDan
Level 8

Re: Reliable tab-spacing of text?

Hi

Thanks a lot, the Courier New option seems to be working well. Btw I am doing this because with several controls for individual labels (8 or so columns), it seems noticeably faster to have one text box.

For the HTML, as im not too familar with it, is there a quick way of padding cells without an entire table? My intent is each gallery option has 'columns'. I dont know if the way your app (thank you for that) can allow for the entries to be selected as that is what I am needing from the gallery.

 

Edit: Whoops I can just keep only the header part!

 

And yeah a datatable would be ideal, but unfortunately has no conditional formatting

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 (4,996)